diff --git a/src/EFCore.Design/Design/Internal/CSharpHelper.cs b/src/EFCore.Design/Design/Internal/CSharpHelper.cs index 8b5cb3c4bac..cb9b7394f84 100644 --- a/src/EFCore.Design/Design/Internal/CSharpHelper.cs +++ b/src/EFCore.Design/Design/Internal/CSharpHelper.cs @@ -1565,18 +1565,7 @@ public virtual IEnumerable GetRequiredUsings(Type type) => type.GetNamespaces(); private string ToSourceCode(SyntaxNode node) - { - var code = node.NormalizeWhitespace().ToFullString(); - var document = _project.AddDocument("Code.cs", SourceText.From(code)); - - var syntaxRootFoo = document.GetSyntaxRootAsync().Result!; - var annotatedDocument = document.WithSyntaxRoot(syntaxRootFoo.WithAdditionalAnnotations(Simplifier.Annotation)); - document = Simplifier.ReduceAsync(annotatedDocument).Result; - - var simplifiedCode = document.GetTextAsync().Result.ToString(); - - return simplifiedCode; - } + => node.NormalizeWhitespace().ToFullString(); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/src/EFCore.Design/Design/Internal/DbContextOperations.cs b/src/EFCore.Design/Design/Internal/DbContextOperations.cs index 71b61ca58f4..3b1c7a4b234 100644 --- a/src/EFCore.Design/Design/Internal/DbContextOperations.cs +++ b/src/EFCore.Design/Design/Internal/DbContextOperations.cs @@ -320,27 +320,7 @@ private IReadOnlyList PrecompileQueries(string? outputDir, DbContext con } var writtenFiles = new List(); - foreach (var generatedFile in generatedFiles) - { - generatedFile.Code = FormatCode(project, generatedFile).GetAwaiter().GetResult().ToString()!; - } - return CompiledModelScaffolder.WriteFiles(generatedFiles, outputDir); - - static async Task FormatCode(Project project, ScaffoldedFile generatedFile) - { - var document = project.AddDocument("_EfGeneratedInterceptors.cs", generatedFile.Code); - - // Run the simplifier to e.g. get rid of unneeded parentheses - var syntaxRoot = (await document.GetSyntaxRootAsync().ConfigureAwait(false))!; - var annotatedDocument = document.WithSyntaxRoot(syntaxRoot.WithAdditionalAnnotations(Simplifier.Annotation)); - document = await Simplifier.ReduceAsync(annotatedDocument, optionSet: null).ConfigureAwait(false); - document = await Formatter.FormatAsync(document, options: null).ConfigureAwait(false); - - var finalSyntaxTree = (await document.GetSyntaxTreeAsync().ConfigureAwait(false))!; - var finalText = await finalSyntaxTree.GetTextAsync().ConfigureAwait(false); - return finalText; - } } private string? GetNamespaceFromOutputPath(string directoryPath) diff --git a/src/EFCore.Design/Properties/DesignStrings.Designer.cs b/src/EFCore.Design/Properties/DesignStrings.Designer.cs index 52142c48ce1..f3a13806988 100644 --- a/src/EFCore.Design/Properties/DesignStrings.Designer.cs +++ b/src/EFCore.Design/Properties/DesignStrings.Designer.cs @@ -742,6 +742,14 @@ public static string UnableToScaffoldIndexMissingProperty(object? indexName, obj GetString("UnableToScaffoldIndexMissingProperty", nameof(indexName), nameof(columnNames)), indexName, columnNames); + /// + /// Unable to translate type '{type}' + /// + public static string UnableToTranslateType(object? type) + => string.Format( + GetString("UnableToTranslateType", nameof(type)), + type); + /// /// The project '{project}' does not support compilation. /// diff --git a/src/EFCore.Design/Properties/DesignStrings.resx b/src/EFCore.Design/Properties/DesignStrings.resx index 5029ecbe9cb..7fffb363422 100644 --- a/src/EFCore.Design/Properties/DesignStrings.resx +++ b/src/EFCore.Design/Properties/DesignStrings.resx @@ -418,6 +418,9 @@ Change your target project to the migrations project by using the Package Manage Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}. + + Unable to translate type '{type}' + The project '{project}' does not support compilation. diff --git a/src/EFCore.Design/Query/Internal/CSharpToLinqTranslator.cs b/src/EFCore.Design/Query/Internal/CSharpToLinqTranslator.cs index 57f9cceb761..ff6284edc1e 100644 --- a/src/EFCore.Design/Query/Internal/CSharpToLinqTranslator.cs +++ b/src/EFCore.Design/Query/Internal/CSharpToLinqTranslator.cs @@ -1076,7 +1076,7 @@ private Type ResolveType(ITypeSymbol typeSymbol, Dictionary? gener var properties = anonymousTypeSymbol.GetMembers().OfType().ToArray(); var found = _anonymousTypeDefinitions.TryGetValue(properties.Select(p => p.Name).ToArray(), out var anonymousTypeGenericDefinition); - Debug.Assert(found, "Anonymous type not found"); + Check.DebugAssert(found, "Anonymous type not found"); var constructorParameters = anonymousTypeGenericDefinition!.GetConstructors()[0].GetParameters(); var genericTypeArguments = new Type[constructorParameters.Length]; diff --git a/src/EFCore.Design/Query/Internal/LinqToCSharpSyntaxTranslator.cs b/src/EFCore.Design/Query/Internal/LinqToCSharpSyntaxTranslator.cs index bf996806d5f..470a72cccb5 100644 --- a/src/EFCore.Design/Query/Internal/LinqToCSharpSyntaxTranslator.cs +++ b/src/EFCore.Design/Query/Internal/LinqToCSharpSyntaxTranslator.cs @@ -444,16 +444,6 @@ Expression VisitAssignment(BinaryExpression assignment, SyntaxKind kind) /// public static string GetUnsafeAccessorName(MemberInfo member) { - StringBuilder stringBuilder = new(); - stringBuilder.Clear().Append("UnsafeAccessor_"); - - if (member.DeclaringType?.Namespace?.Replace(".", "_") is string typeNamespace) - { - stringBuilder.Append(typeNamespace).Append('_'); - } - - stringBuilder.Append(member.DeclaringType!.Name.Replace("`", "")).Append('_'); - // If this is the backing field of an auto-property, extract the name of the property from its compiler-generated name // (e.g. k__BackingField) var memberName = member.Name; @@ -464,9 +454,8 @@ public static string GetUnsafeAccessorName(MemberInfo member) memberName = memberName[1..pos]; } - stringBuilder.Append(memberName); - - return stringBuilder.ToString(); + var first = memberName[0]; + return !char.IsUpper(first) ? char.ToUpperInvariant(first) + memberName[1..] : memberName; } /// @@ -1318,122 +1307,169 @@ protected virtual IdentifierNameSyntax TranslateLabelTarget(LabelTarget labelTar /// doing so can result in application failures when updating to a new Entity Framework Core release. /// protected virtual TypeSyntax Generate(Type type) + => TryGenerate(type, out var result) + ? result + : throw new NotSupportedException(DesignStrings.UnableToTranslateType(type.DisplayName(fullName: false))); + + /// + /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to + /// the same compatibility standards as public APIs. It may be changed or removed without notice in + /// any release. You should only use it directly in your code with extreme caution and knowing that + /// doing so can result in application failures when updating to a new Entity Framework Core release. + /// + protected virtual bool TryGenerate(Type type, [NotNullWhen(true)] out TypeSyntax? result) { + result = null; + if (type.IsAnonymousType()) + { + return false; + } + if (type.IsGenericType) { - // This should produce terser code, but currently gets broken by the Simplifier - //if (type.IsConstructedGenericType - // && type.GetGenericTypeDefinition() == typeof(Nullable<>)) - //{ - // return NullableType(Translate(type.GenericTypeArguments[0])); - //} + if (type.IsConstructedGenericType + && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + result = NullableType(Generate(type.GenericTypeArguments[0])); + return true; + } + + var genericArguments = new List(); + foreach (var genericArgument in type.GenericTypeArguments) + { + if (!TryGenerate(genericArgument, out var syntax)) + { + return false; + } + genericArguments.Add(syntax); + } var generic = GenericName( Identifier(type.Name.Substring(0, type.Name.IndexOf('`'))), - TypeArgumentList(SeparatedList(type.GenericTypeArguments.Select(Generate)))); + TypeArgumentList(SeparatedList(genericArguments))); if (type.IsNested) { - return QualifiedName( + result = QualifiedName( (NameSyntax)Generate(type.DeclaringType!), generic); + return true; } AddNamespace(type); - return generic; + result = generic; + return true; } if (type.IsArray) { - return ArrayType(Generate(type.GetElementType()!)) + result = ArrayType(Generate(type.GetElementType()!)) .WithRankSpecifiers(SingletonList(ArrayRankSpecifier(SingletonSeparatedList(OmittedArraySizeExpression())))); + return true; } if (type == typeof(string)) { - return PredefinedType(Token(SyntaxKind.StringKeyword)); + result = PredefinedType(Token(SyntaxKind.StringKeyword)); + return true; } if (type == typeof(bool)) { - return PredefinedType(Token(SyntaxKind.BoolKeyword)); + result = PredefinedType(Token(SyntaxKind.BoolKeyword)); + return true; } if (type == typeof(byte)) { - return PredefinedType(Token(SyntaxKind.ByteKeyword)); + result = PredefinedType(Token(SyntaxKind.ByteKeyword)); + return true; } if (type == typeof(sbyte)) { - return PredefinedType(Token(SyntaxKind.SByteKeyword)); + result = PredefinedType(Token(SyntaxKind.SByteKeyword)); + return true; } if (type == typeof(int)) { - return PredefinedType(Token(SyntaxKind.IntKeyword)); + result = PredefinedType(Token(SyntaxKind.IntKeyword)); + return true; } if (type == typeof(uint)) { - return PredefinedType(Token(SyntaxKind.UIntKeyword)); + result = PredefinedType(Token(SyntaxKind.UIntKeyword)); + return true; } if (type == typeof(short)) { - return PredefinedType(Token(SyntaxKind.ShortKeyword)); + result = PredefinedType(Token(SyntaxKind.ShortKeyword)); + return true; } if (type == typeof(ushort)) { - return PredefinedType(Token(SyntaxKind.UShortKeyword)); + result = PredefinedType(Token(SyntaxKind.UShortKeyword)); + return true; } if (type == typeof(long)) { - return PredefinedType(Token(SyntaxKind.LongKeyword)); + result = PredefinedType(Token(SyntaxKind.LongKeyword)); + return true; } if (type == typeof(ulong)) { - return PredefinedType(Token(SyntaxKind.ULongKeyword)); + result = PredefinedType(Token(SyntaxKind.ULongKeyword)); + return true; } if (type == typeof(float)) { - return PredefinedType(Token(SyntaxKind.FloatKeyword)); + result = PredefinedType(Token(SyntaxKind.FloatKeyword)); + return true; } if (type == typeof(double)) { - return PredefinedType(Token(SyntaxKind.DoubleKeyword)); + result = PredefinedType(Token(SyntaxKind.DoubleKeyword)); + return true; } if (type == typeof(decimal)) { - return PredefinedType(Token(SyntaxKind.DecimalKeyword)); + result = PredefinedType(Token(SyntaxKind.DecimalKeyword)); + return true; } if (type == typeof(char)) { - return PredefinedType(Token(SyntaxKind.CharKeyword)); + result = PredefinedType(Token(SyntaxKind.CharKeyword)); + return true; } if (type == typeof(object)) { - return PredefinedType(Token(SyntaxKind.ObjectKeyword)); + result = PredefinedType(Token(SyntaxKind.ObjectKeyword)); + return true; } if (type == typeof(void)) { - return PredefinedType(Token(SyntaxKind.VoidKeyword)); + result = PredefinedType(Token(SyntaxKind.VoidKeyword)); + return true; } if (type.IsNested) { - return QualifiedName( + result = QualifiedName( (NameSyntax)Generate(type.DeclaringType!), IdentifierName(type.Name)); + return true; } if (type.IsNested) @@ -1445,7 +1481,8 @@ protected virtual TypeSyntax Generate(Type type) _collectedNamespaces.Add(type.Namespace); } - return IdentifierName(type.Name); + result = IdentifierName(type.Name); + return true; } /// @@ -1466,15 +1503,19 @@ protected override Expression VisitLambda(Expression lambda) stackFrame.VariableNames.Add(name); } - var body = (CSharpSyntaxNode)Translate(lambda.Body); + var body = Translate(lambda.Body); + var expressionBody = body as ExpressionSyntax; + var blockBody = body as BlockSyntax; // If the lambda body was an expression that had lifted statements (e.g. some block in expression context), we need to create // a block to contain these statements if (_liftedState.Statements.Count > 0) { Check.DebugAssert(lambda.ReturnType != typeof(void), "lambda.ReturnType != typeof(void)"); + Check.DebugAssert(expressionBody != null, "expressionBody != null"); - body = Block(_liftedState.Statements.Append(ReturnStatement((ExpressionSyntax)body))); + blockBody = Block(_liftedState.Statements.Append(ReturnStatement(expressionBody))); + expressionBody = null; _liftedState.Statements.Clear(); } @@ -1482,13 +1523,16 @@ protected override Expression VisitLambda(Expression lambda) // This is because in some cases, the parameter isn't actually used in the lambda body, and the compiler can't infer its type. // However, we can't do that when the type is anonymous. Result = ParenthesizedLambdaExpression( + attributeLists: List(), + modifiers: TokenList(), + returnType: lambda.ReturnType == typeof(void) || !TryGenerate(lambda.ReturnType, out var returnSyntax) ? null : returnSyntax, ParameterList( SeparatedList( lambda.Parameters.Select( - p => - Parameter(Identifier(LookupVariableName(p))) + p => Parameter(Identifier(LookupVariableName(p))) .WithType(p.Type.IsAnonymousType() ? null : Generate(p.Type))))), - body); + blockBody, + expressionBody); var popped = _stack.Pop(); Check.DebugAssert(popped.Equals(stackFrame), "popped.Equals(stackFrame)"); diff --git a/src/EFCore.Design/Query/Internal/PrecompiledQueryCodeGenerator.cs b/src/EFCore.Design/Query/Internal/PrecompiledQueryCodeGenerator.cs index d8884f59b8f..52a3752053c 100644 --- a/src/EFCore.Design/Query/Internal/PrecompiledQueryCodeGenerator.cs +++ b/src/EFCore.Design/Query/Internal/PrecompiledQueryCodeGenerator.cs @@ -328,7 +328,9 @@ protected virtual Expression CompileQuery(Expression penultimateOperator, Method // First, check whether this is an async query. var async = terminatingOperator.Type.IsGenericType && terminatingOperator.Type.GetGenericTypeDefinition() is var genericDefinition - && (genericDefinition == typeof(Task<>) || genericDefinition == typeof(ValueTask<>)); + && (genericDefinition == typeof(Task<>) + || genericDefinition == typeof(ValueTask<>) + || genericDefinition == typeof(IAsyncEnumerable<>)); var preparedQuery = PrepareQueryForCompilation(penultimateOperator, terminatingOperator); diff --git a/src/EFCore.Design/Scaffolding/Internal/CSharpRuntimeModelCodeGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpRuntimeModelCodeGenerator.cs index deef99e67d1..bc65c7aeed0 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CSharpRuntimeModelCodeGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpRuntimeModelCodeGenerator.cs @@ -27,6 +27,7 @@ public class CSharpRuntimeModelCodeGenerator : ICompiledModelCodeGenerator private const string ModelSuffix = "Model"; private const string ModelBuilderSuffix = "ModelBuilder"; private const string EntityTypeSuffix = "EntityType"; + private const string UnsafeAccessorsSuffix = "UnsafeAccessors"; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -66,31 +67,66 @@ public virtual IReadOnlyCollection GenerateModel( var scaffoldedFiles = new List(); var assemblyAttributesCode = CreateAssemblyAttributes(options.ModelNamespace, options.ContextType, nullable); - var assemblyInfoFileName = Uniquify(options.ContextType.ShortDisplayName() + AssemblyAttributesSuffix, options); + var assemblyInfoFileName = UniquifyFileName(options.ContextType.ShortDisplayName() + AssemblyAttributesSuffix, options); scaffoldedFiles.Add(new(assemblyInfoFileName, assemblyAttributesCode)); + var unsafeAccessorClassNames = new BidirectionalDictionary(); + var unsafeAccessorTypes = new Dictionary>(); + var memberAccessReplacements = new Dictionary(); + foreach (var entityType in model.GetEntityTypes()) + { + RegisterPrivateAccessors(entityType, options, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + + foreach (var navigation in entityType.GetDeclaredNavigations()) + { + RegisterPrivateAccessors( + navigation, options.ModelNamespace, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + } + + foreach (var navigation in entityType.GetDeclaredSkipNavigations()) + { + RegisterPrivateAccessors( + navigation, options.ModelNamespace, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + } + } + + foreach (var unsafeAccessorPair in unsafeAccessorTypes) + { + (var unsafeAccessorType, var members) = unsafeAccessorPair; + var generatedCode = GenerateUnsafeAccessorType( + unsafeAccessorType, + members, + options.ModelNamespace, + unsafeAccessorClassNames[unsafeAccessorType], + memberAccessReplacements, + nullable); + + var entityTypeFileName = UniquifyFileName(unsafeAccessorClassNames[unsafeAccessorType], options); + scaffoldedFiles.Add(new(entityTypeFileName, generatedCode)); + } + var modelCode = CreateModel(options.ModelNamespace, options.ContextType, nullable); - var modelFileName = Uniquify(options.ContextType.ShortDisplayName() + ModelSuffix, options); + var modelFileName = UniquifyFileName(options.ContextType.ShortDisplayName() + ModelSuffix, options); scaffoldedFiles.Add(new(modelFileName, modelCode)); var configurationClassNames = new Dictionary(); var modelBuilderCode = CreateModelBuilder( model, options.ModelNamespace, options.ContextType, configurationClassNames, nullable); - var modelBuilderFileName = Uniquify(options.ContextType.ShortDisplayName() + ModelBuilderSuffix, options); + var modelBuilderFileName = UniquifyFileName(options.ContextType.ShortDisplayName() + ModelBuilderSuffix, options); scaffoldedFiles.Add(new(modelBuilderFileName, modelBuilderCode)); foreach (var entityType in model.GetEntityTypesInHierarchicalOrder()) { - var generatedCode = GenerateEntityType(entityType, options.ModelNamespace, configurationClassNames, nullable); + var generatedCode = GenerateEntityType(entityType, options.ModelNamespace, configurationClassNames, memberAccessReplacements, nullable); - var entityTypeFileName = Uniquify(configurationClassNames[entityType], options); + var entityTypeFileName = UniquifyFileName(configurationClassNames[entityType], options); scaffoldedFiles.Add(new(entityTypeFileName, generatedCode)); } return scaffoldedFiles; } - private string Uniquify(string name, CompiledModelCodeGenerationOptions options) + private string UniquifyFileName(string name, CompiledModelCodeGenerationOptions options) => Uniquifier.Uniquify( name, options.GeneratedFileNames, @@ -154,6 +190,136 @@ private string CreateAssemblyAttributes( private string GetModelClassName(Type contextType) => _code.Identifier(contextType.ShortDisplayName()) + ModelSuffix; + private string GenerateUnsafeAccessorType( + Type type, + HashSet members, + string @namespace, + string className, + Dictionary memberAccessReplacements, + bool nullable) + { + var mainBuilder = new IndentedStringBuilder(); + var namespaces = new SortedSet(new NamespaceComparer()); + + AddNamespace(type, namespaces); + + if (!string.IsNullOrEmpty(@namespace)) + { + mainBuilder + .Append("namespace ").AppendLine(_code.Namespace(@namespace)) + .AppendLine("{"); + mainBuilder.Indent(); + } + + mainBuilder + .Append("public static class ").Append(className); + if (type.IsGenericTypeDefinition) + { + var genericParameters = type.GetGenericArguments(); + mainBuilder + .Append("<") + .AppendJoin(genericParameters.Select(a => _code.Reference(a)), ", ") + .AppendLine(">"); + + using (mainBuilder.Indent()) + { + foreach (var genericParameter in genericParameters) + { + if (genericParameter.GetGenericParameterConstraints().Length == 0 + && (genericParameter.GenericParameterAttributes & GenericParameterAttributes.SpecialConstraintMask) == GenericParameterAttributes.None) + { + continue; + } + + mainBuilder + .Append("where ").Append(_code.Reference(genericParameter)).Append(" : "); + + var constraintList = new List(); + var constraintAttributes = genericParameter.GenericParameterAttributes; + if (constraintAttributes != GenericParameterAttributes.None) + { + if (constraintAttributes.HasFlag(GenericParameterAttributes.NotNullableValueTypeConstraint)) + { + constraintList.Add("struct"); + } + + if (constraintAttributes.HasFlag(GenericParameterAttributes.ReferenceTypeConstraint)) + { + constraintList.Add("class"); + } + + if (constraintAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint)) + { + constraintList.Add("new()"); + } + + Check.DebugAssert(!constraintAttributes.HasFlag(GenericParameterAttributes.VarianceMask), + "Variance constraints not supported for type: " + type.DisplayName()); + } + + var constraints = genericParameter.GetGenericParameterConstraints(); + if (constraints.Length != 0) + { + foreach (var constraint in constraints) + { + AddNamespace(constraint, namespaces); + constraintList.Add(_code.Reference(constraint)); + } + } + + mainBuilder + .AppendJoin(constraintList, ", ") + .AppendLine(); + } + } + } + else + { + mainBuilder + .AppendLine(); + } + + var methodBuilder = new IndentedStringBuilder(); + var scopeVariables = new BidirectionalDictionary(); + var parameters = new CSharpRuntimeAnnotationCodeGeneratorParameters( + "this", + className, + @namespace, + mainBuilder, + methodBuilder, + namespaces, + scopeVariables.Inverse, + scopeVariables, + configurationClassNames: [], + nullable); + + mainBuilder + .Append("{"); + using (mainBuilder.Indent()) + { + foreach (var member in members) + { + GeneratePrivateAccessor(member, parameters); + } + + var methods = methodBuilder.ToString(); + if (!string.IsNullOrEmpty(methods)) + { + mainBuilder.AppendLines(methods); + } + } + + mainBuilder.AppendLine("}"); + + if (!string.IsNullOrEmpty(@namespace)) + { + mainBuilder.DecrementIndent(); + mainBuilder.AppendLine("}"); + } + + return GenerateHeader(namespaces, @namespace, nullable) + mainBuilder; + } + private string CreateModel( string @namespace, Type contextType, @@ -521,7 +687,12 @@ private void Create( mainBuilder.AppendLine(); } - private string GenerateEntityType(IEntityType entityType, string @namespace, Dictionary entityClassNames, bool nullable) + private string GenerateEntityType( + IEntityType entityType, + string @namespace, + Dictionary entityClassNames, + Dictionary memberAccessReplacements, + bool nullable) { var mainBuilder = new IndentedStringBuilder(); var methodBuilder = new IndentedStringBuilder(); @@ -546,12 +717,11 @@ private string GenerateEntityType(IEntityType entityType, string @namespace, Dic .AppendLine("{"); using (mainBuilder.Indent()) { - var memberAccessReplacements = new Dictionary(); CreateEntityType(entityType, @namespace, mainBuilder, methodBuilder, namespaces, entityClassNames, memberAccessReplacements, nullable); foreach (var complexProperty in entityType.GetDeclaredComplexProperties()) { - CreateComplexProperty(complexProperty, @namespace, mainBuilder, methodBuilder, namespaces, entityClassNames, className, nullable); + CreateComplexProperty(complexProperty, @namespace, mainBuilder, methodBuilder, namespaces, entityClassNames, memberAccessReplacements, className, nullable); } var foreignKeyNumber = 1; @@ -593,7 +763,7 @@ private void CreateEntityType( IndentedStringBuilder methodBuilder, SortedSet namespaces, Dictionary configurationClassNames, - Dictionary? memberAccessReplacements, + Dictionary memberAccessReplacements, bool nullable) { mainBuilder @@ -655,16 +825,6 @@ private void CreateEntityType( .AppendLine(");"); } - foreach (var navigation in entityType.GetDeclaredNavigations()) - { - CreatePrivateAccessors(navigation, memberAccessReplacements, parameters); - } - - foreach (var navigation in entityType.GetDeclaredSkipNavigations()) - { - CreatePrivateAccessors(navigation, memberAccessReplacements, parameters); - } - foreach (var key in entityType.GetDeclaredKeys()) { Create(key, parameters, nullable); @@ -1170,8 +1330,6 @@ private void if (!property.IsShadowProperty() && property is not IServiceProperty) // Service properties don't use property accessors { - memberAccessReplacements = CreatePrivateAccessors(property, memberAccessReplacements, parameters, create: createPrivateAccessors); - ClrPropertyGetterFactory.Instance.Create( property, out var getterExpression, @@ -1254,13 +1412,35 @@ private void .Append("storeGenerationIndex: ").Append(_code.Literal(propertyIndexes.StoreGenerationIndex)).AppendLine(");") .DecrementIndent(); } + private void RegisterPrivateAccessors( + ITypeBase structuralType, + CompiledModelCodeGenerationOptions options, + BidirectionalDictionary unsafeAccessorClassNames, + Dictionary> unsafeAccessorTypes, + Dictionary memberAccessReplacements) + { + foreach (var property in structuralType.GetDeclaredProperties()) + { + RegisterPrivateAccessors( + property, options.ModelNamespace, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + } - private Dictionary? CreatePrivateAccessors( + foreach (var property in structuralType.GetDeclaredComplexProperties()) + { + RegisterPrivateAccessors( + property, options.ModelNamespace, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + + RegisterPrivateAccessors( + property.ComplexType, options, unsafeAccessorClassNames, unsafeAccessorTypes, memberAccessReplacements); + } + } + + private Dictionary? RegisterPrivateAccessors( IPropertyBase property, - Dictionary? memberAccessReplacements, - CSharpRuntimeAnnotationCodeGeneratorParameters parameters, - bool create = true, - bool qualify = false) + string @namespace, + BidirectionalDictionary unsafeAccessorClassNames, + Dictionary> unsafeAccessorTypes, + Dictionary? memberAccessReplacements) { if (property.IsShadowProperty() || property.IsIndexerProperty()) @@ -1268,10 +1448,14 @@ private void return memberAccessReplacements; } - var getter = CreatePrivateAccessor(property, forMaterialization: false, forSet: false, create, qualify, ref memberAccessReplacements, parameters); - var setter = CreatePrivateAccessor(property, forMaterialization: false, forSet: true, create, qualify, ref memberAccessReplacements, parameters); - var queryGetter = CreatePrivateAccessor(property, forMaterialization: true, forSet: false, create, qualify, ref memberAccessReplacements, parameters); - var querySetter = CreatePrivateAccessor(property, forMaterialization: true, forSet: true, create, qualify, ref memberAccessReplacements, parameters); + var getter = RegisterPrivateAccessor( + property, forMaterialization: false, forSet: false, @namespace, unsafeAccessorClassNames, unsafeAccessorTypes, ref memberAccessReplacements); + var setter = RegisterPrivateAccessor( + property, forMaterialization: false, forSet: true, @namespace, unsafeAccessorClassNames, unsafeAccessorTypes, ref memberAccessReplacements); + var queryGetter = RegisterPrivateAccessor( + property, forMaterialization: true, forSet: false, @namespace, unsafeAccessorClassNames, unsafeAccessorTypes, ref memberAccessReplacements); + var querySetter = RegisterPrivateAccessor( + property, forMaterialization: true, forSet: true, @namespace, unsafeAccessorClassNames, unsafeAccessorTypes, ref memberAccessReplacements); if (getter != null || setter != null @@ -1301,17 +1485,16 @@ private void return memberAccessReplacements; } - private QualifiedName? CreatePrivateAccessor( + private QualifiedName? RegisterPrivateAccessor( IPropertyBase property, bool forMaterialization, bool forSet, - bool create, - bool qualify, - ref Dictionary? memberAccessReplacements, - CSharpRuntimeAnnotationCodeGeneratorParameters parameters) + string @namespace, + BidirectionalDictionary unsafeAccessorClassNames, + Dictionary> unsafeAccessorTypes, + ref Dictionary? memberAccessReplacements) { var member = property.GetMemberInfo(forMaterialization, forSet); - switch (member) { case FieldInfo field: @@ -1322,32 +1505,6 @@ private void return null; } - memberAccessReplacements ??= []; - var methodName = LinqToCSharpSyntaxTranslator.GetUnsafeAccessorName(field); - - var qualifiedName = new QualifiedName( - parameters.ConfigurationClassNames[property.DeclaringType] + "." + methodName, - parameters.Namespace); - - memberAccessReplacements.Add(field, qualify - ? qualifiedName - : new QualifiedName(methodName, "")); - - if (create) - { - AddNamespace(typeof(UnsafeAccessorAttribute), parameters.Namespaces); - AddNamespace(field.FieldType, parameters.Namespaces); - AddNamespace(field.DeclaringType!, parameters.Namespaces); - - parameters.MethodBuilder - .AppendLine() - .AppendLine($"[UnsafeAccessor(UnsafeAccessorKind.Field, Name = \"{field.Name}\")]") - .Append($"public static extern ref {_code.Reference(field.FieldType)} {methodName}(") - .AppendLine($"{_code.Reference(field.DeclaringType!)} @this);"); - - return qualifiedName; - } - break; } case PropertyInfo propertyInfo: @@ -1360,54 +1517,104 @@ private void return null; } - memberAccessReplacements ??= []; - var methodName = LinqToCSharpSyntaxTranslator.GetUnsafeAccessorName(methodInfo); + member = methodInfo; - var qualifiedName = new QualifiedName( - parameters.ConfigurationClassNames[property.DeclaringType] + "." + methodName, - parameters.Namespace); + break; + } + } - memberAccessReplacements.Add(methodInfo, qualify - ? qualifiedName - : new QualifiedName(methodName, "")); + memberAccessReplacements ??= []; + var methodName = LinqToCSharpSyntaxTranslator.GetUnsafeAccessorName(member); - if (create) - { - AddNamespace(typeof(UnsafeAccessorAttribute), parameters.Namespaces); - AddNamespace(methodInfo.ReturnType, parameters.Namespaces); - AddNamespace(methodInfo.DeclaringType!, parameters.Namespaces); - foreach (var parameter in methodInfo.GetParameters()) - { - AddNamespace(parameter.ParameterType, parameters.Namespaces); - } + var declaringType = member.DeclaringType!; + if (declaringType.IsGenericType + && !declaringType.IsGenericTypeDefinition) + { + var genericArguments = string.Join(", ", declaringType.GetGenericArguments().Select(a => _code.Reference(a))); + declaringType = declaringType.GetGenericTypeDefinition(); - var returnType = methodInfo.ReturnType == typeof(void) - ? "void" - : _code.Reference(methodInfo.ReturnType); + if (!unsafeAccessorClassNames.TryGetValue(declaringType, out var className)) + { + className = Uniquifier.Uniquify( + declaringType.Name[..declaringType.Name.IndexOf('`')], unsafeAccessorClassNames.Inverse, UnsafeAccessorsSuffix, int.MaxValue); + unsafeAccessorClassNames[declaringType] = className; + } - parameters.MethodBuilder - .AppendLine() - .AppendLine($"[UnsafeAccessor(UnsafeAccessorKind.Method, Name = \"{methodInfo.Name}\")]") - .Append($"public static extern {returnType} {methodName}(") - .Append($"{_code.Reference(methodInfo.DeclaringType!)} @this"); + var qualifiedName = new QualifiedName($"{className}<{genericArguments}>.{methodName}", @namespace); + memberAccessReplacements.Add(member, qualifiedName); + member = declaringType.GetMemberWithSameMetadataDefinitionAs(member); + } + else + { + if (!unsafeAccessorClassNames.TryGetValue(declaringType, out var className)) + { + className = Uniquifier.Uniquify( + declaringType.Name, unsafeAccessorClassNames.Inverse, UnsafeAccessorsSuffix, int.MaxValue); + unsafeAccessorClassNames[declaringType] = className; + } - if (methodInfo.GetParameters().Length > 0) - { - parameters.MethodBuilder - .Append($", ") - .AppendJoin(methodInfo.GetParameters().Select(p => _code.Reference(p.ParameterType) + " " + _code.Identifier(p.Name!)), ", "); - } + var qualifiedName = new QualifiedName(className + "." + methodName, @namespace); + memberAccessReplacements.Add(member, qualifiedName); + } + + unsafeAccessorTypes.GetOrAddNew(declaringType).Add(member); + + return null; + } + + private void GeneratePrivateAccessor( + MemberInfo member, + CSharpRuntimeAnnotationCodeGeneratorParameters parameters) + { + var methodName = LinqToCSharpSyntaxTranslator.GetUnsafeAccessorName(member); + var declaringType = member.DeclaringType!; + AddNamespace(declaringType, parameters.Namespaces); + AddNamespace(typeof(UnsafeAccessorAttribute), parameters.Namespaces); + switch (member) + { + case FieldInfo field: + { + AddNamespace(field.FieldType, parameters.Namespaces); - parameters.MethodBuilder.AppendLine(");"); + parameters.MainBuilder + .AppendLine() + .AppendLine($"[UnsafeAccessor(UnsafeAccessorKind.Field, Name = \"{field.Name}\")]") + .Append($"public static extern ref {_code.Reference(field.FieldType)} {methodName}(") + .AppendLine($"{_code.Reference(declaringType)} @this);"); + break; + } + case MethodInfo methodInfo: + { + AddNamespace(methodInfo.ReturnType, parameters.Namespaces); + foreach (var parameter in methodInfo.GetParameters()) + { + AddNamespace(parameter.ParameterType, parameters.Namespaces); + } - return qualifiedName; + var returnType = methodInfo.ReturnType == typeof(void) + ? "void" + : _code.Reference(methodInfo.ReturnType); + + parameters.MainBuilder + .AppendLine() + .AppendLine($"[UnsafeAccessor(UnsafeAccessorKind.Method, Name = \"{methodInfo.Name}\")]") + .Append($"public static extern {returnType} {methodName}(") + .Append($"{_code.Reference(declaringType)} @this"); + + if (methodInfo.GetParameters().Length > 0) + { + parameters.MainBuilder + .Append($", ") + .AppendJoin(methodInfo.GetParameters().Select(p => _code.Reference(p.ParameterType) + " " + _code.Identifier(p.Name!)), ", "); } + parameters.MainBuilder.AppendLine(");"); break; } + default: + Check.DebugAssert(false, "Unsupported member type: " + member); + break; } - - return null; } private static Type? GetValueConverterType(IProperty property) @@ -1644,6 +1851,7 @@ private void CreateComplexProperty( IndentedStringBuilder methodBuilder, SortedSet namespaces, Dictionary configurationClassNames, + Dictionary memberAccessReplacements, string topClassName, bool nullable) { @@ -1773,13 +1981,6 @@ private void CreateComplexProperty( var complexTypeParameters = parameters with { TargetName = complexTypeVariable }; var complexPropertyParameters = parameters with { TargetName = complexPropertyVariable }; - Dictionary? memberAccessReplacements = null; - - foreach (var chainedComplexProperty in complexProperty.GetChainToComplexProperty()) - { - memberAccessReplacements = CreatePrivateAccessors(chainedComplexProperty, memberAccessReplacements, complexTypeParameters, create: chainedComplexProperty == complexProperty); - } - SetPropertyBaseProperties(complexProperty, memberAccessReplacements, complexPropertyParameters); foreach (var property in complexType.GetProperties()) @@ -1821,6 +2022,7 @@ private void CreateComplexProperty( methodBuilder, namespaces, configurationClassNames, + memberAccessReplacements, topClassName, nullable); } @@ -2010,7 +2212,6 @@ private void SetNavigationBaseProperties( Dictionary memberAccessReplacements, CSharpRuntimeAnnotationCodeGeneratorParameters parameters) { - CreatePrivateAccessors(navigation, memberAccessReplacements, parameters, create: false, qualify: true); SetPropertyBaseProperties(navigation, memberAccessReplacements, parameters, createPrivateAccessors: false); if (!navigation.IsCollection) @@ -2247,7 +2448,7 @@ private void CreateAnnotations( configurationClassNames, nullable); - GenerateMemberReferences(entityType, memberAccessReplacements, parameters); + GenerateMemberReferences(entityType, parameters); foreach (var key in entityType.GetDeclaredKeys()) { @@ -2301,8 +2502,6 @@ private void CreateAnnotations( { var variableName = _code.Identifier(navigation.Name, navigation, parameters.ScopeObjects, capitalize: false); - CreatePrivateAccessors(navigation, memberAccessReplacements, parameters, create: false, qualify: navigation.DeclaringType != entityType); - mainBuilder .Append($"var {variableName} = ") .AppendLine($"{parameters.TargetName}.FindNavigation({_code.Literal(navigation.Name)})!;"); @@ -2389,20 +2588,15 @@ private void CreateAnnotations( .AppendLine() .AppendLine("static partial void Customize(RuntimeEntityType runtimeEntityType);"); - Dictionary? GenerateMemberReferences( + void GenerateMemberReferences( ITypeBase structuralType, - Dictionary? memberAccessReplacements, - CSharpRuntimeAnnotationCodeGeneratorParameters parameters, - bool nested = false) + CSharpRuntimeAnnotationCodeGeneratorParameters parameters) { var mainBuilder = parameters.MainBuilder; foreach (var property in structuralType.GetProperties()) { var variableName = _code.Identifier(property.Name, property, parameters.ScopeObjects, capitalize: false); - memberAccessReplacements = CreatePrivateAccessors( - property, memberAccessReplacements, parameters, create: false, qualify: nested || property.DeclaringType != structuralType); - mainBuilder .Append($"var {variableName} = ") .AppendLine($"{parameters.ScopeVariables[structuralType]}.FindProperty({_code.Literal(property.Name)})!;"); @@ -2412,9 +2606,6 @@ private void CreateAnnotations( { var variableName = _code.Identifier(complexProperty.Name, complexProperty, parameters.ScopeObjects, capitalize: false); - memberAccessReplacements = CreatePrivateAccessors( - complexProperty, memberAccessReplacements, parameters, create: false, qualify: nested || complexProperty.DeclaringType != structuralType); - mainBuilder .Append($"var {variableName} = ") .AppendLine($"{parameters.ScopeVariables[structuralType]}.FindComplexProperty({_code.Literal(complexProperty.Name)})!;"); @@ -2426,10 +2617,8 @@ private void CreateAnnotations( .Append($"var {typeVariableName} = ") .AppendLine($"{variableName}.ComplexType;"); - memberAccessReplacements = GenerateMemberReferences(complexProperty.ComplexType, memberAccessReplacements, parameters, nested: true); + GenerateMemberReferences(complexProperty.ComplexType, parameters); } - - return memberAccessReplacements; } } diff --git a/src/EFCore.Relational/Metadata/Internal/RelationalModel.cs b/src/EFCore.Relational/Metadata/Internal/RelationalModel.cs index e897a5deed2..637be020b0e 100644 --- a/src/EFCore.Relational/Metadata/Internal/RelationalModel.cs +++ b/src/EFCore.Relational/Metadata/Internal/RelationalModel.cs @@ -93,7 +93,6 @@ public override bool IsReadOnly public virtual ITable? FindTable(string name, string? schema) => Tables.GetValueOrDefault((name, schema)); - // TODO: Confirm that this makes sense /// public virtual TableBase? FindDefaultTable(string name) => DefaultTables.GetValueOrDefault(name); diff --git a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs index 5aefe0b8192..1a760d7cff7 100644 --- a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs @@ -108,14 +108,14 @@ protected virtual Expression VisitNonQuery(NonQueryExpression nonQueryExpression } private static readonly MethodInfo NonQueryMethodInfo - = typeof(RelationalShapedQueryCompilingExpressionVisitor).GetTypeInfo() - .GetDeclaredMethods(nameof(NonQueryResult)) - .Single(mi => mi.GetParameters().Length == 5); + = typeof(RelationalShapedQueryCompilingExpressionVisitor) + .GetMethods() + .Single(mi => mi.Name == nameof(NonQueryResult) && mi.GetParameters().Length == 5); private static readonly MethodInfo NonQueryAsyncMethodInfo - = typeof(RelationalShapedQueryCompilingExpressionVisitor).GetTypeInfo() - .GetDeclaredMethods(nameof(NonQueryResultAsync)) - .Single(mi => mi.GetParameters().Length == 5); + = typeof(RelationalShapedQueryCompilingExpressionVisitor) + .GetMethods() + .Single(mi => mi.Name == nameof(NonQueryResultAsync) & mi.GetParameters().Length == 5); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -293,9 +293,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery : (Expression)Constant(null, typeof(Func)); return Call( - typeof(GroupBySplitQueryingEnumerable).GetMethods() - .Single(m => m.Name == nameof(GroupBySplitQueryingEnumerable.Create)) - .MakeGenericMethod(keySelector.ReturnType, elementSelector.ReturnType), + CreateGroupBySplitQueryingEnumerableMethodInfo.MakeGenericMethod(keySelector.ReturnType, elementSelector.ReturnType), Convert(QueryCompilationContext.QueryContextParameter, typeof(RelationalQueryContext)), relationalCommandResolver, readerColumnsExpression, @@ -320,9 +318,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery } return Call( - typeof(GroupBySingleQueryingEnumerable).GetMethods() - .Single(m => m.Name == nameof(GroupBySingleQueryingEnumerable.Create)) - .MakeGenericMethod(keySelector.ReturnType, elementSelector.ReturnType), + CreateGroupBySingleQueryingEnumerableMethodInfo.MakeGenericMethod(keySelector.ReturnType, elementSelector.ReturnType), Convert(QueryCompilationContext.QueryContextParameter, typeof(RelationalQueryContext)), relationalCommandResolver, readerColumnsExpression, @@ -361,9 +357,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery if (nonComposedFromSql) { return Call( - typeof(FromSqlQueryingEnumerable).GetMethods() - .Single(m => m.Name == nameof(FromSqlQueryingEnumerable.Create)) - .MakeGenericMethod(shaper.ReturnType), + CreateFromSqlQueryingEnumerableMethodInfo.MakeGenericMethod(shaper.ReturnType), Convert(QueryCompilationContext.QueryContextParameter, typeof(RelationalQueryContext)), relationalCommandResolver, readerColumnsExpression, @@ -396,9 +390,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery : Constant(null, typeof(Func)); return Call( - typeof(SplitQueryingEnumerable).GetMethods() - .Single(m => m.Name == nameof(SplitQueryingEnumerable.Create)) - .MakeGenericMethod(shaper.ReturnType), + CreateSplitQueryingEnumerableMethodInfo.MakeGenericMethod(shaper.ReturnType), Convert(QueryCompilationContext.QueryContextParameter, typeof(RelationalQueryContext)), relationalCommandResolver, readerColumnsExpression, @@ -412,9 +404,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery } return Call( - typeof(SingleQueryingEnumerable).GetMethods() - .Single(m => m.Name == nameof(SingleQueryingEnumerable.Create)) - .MakeGenericMethod(shaper.ReturnType), + CreateSingleQueryingEnumerableMethodInfo.MakeGenericMethod(shaper.ReturnType), Convert(QueryCompilationContext.QueryContextParameter, typeof(RelationalQueryContext)), relationalCommandResolver, readerColumnsExpression, @@ -426,6 +416,26 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery } } + private static readonly MethodInfo CreateFromSqlQueryingEnumerableMethodInfo + = typeof(FromSqlQueryingEnumerable) + .GetMethod(nameof(FromSqlQueryingEnumerable.Create))!; + + private static readonly MethodInfo CreateSingleQueryingEnumerableMethodInfo + = typeof(SingleQueryingEnumerable) + .GetMethod(nameof(SingleQueryingEnumerable.Create))!; + + private static readonly MethodInfo CreateSplitQueryingEnumerableMethodInfo + = typeof(SplitQueryingEnumerable) + .GetMethod(nameof(SplitQueryingEnumerable.Create))!; + + private static readonly MethodInfo CreateGroupBySingleQueryingEnumerableMethodInfo + = typeof(GroupBySingleQueryingEnumerable) + .GetMethod(nameof(GroupBySingleQueryingEnumerable.Create))!; + + private static readonly MethodInfo CreateGroupBySplitQueryingEnumerableMethodInfo + = typeof(GroupBySplitQueryingEnumerable) + .GetMethod(nameof(GroupBySplitQueryingEnumerable.Create))!; + private static Expression CreateReaderColumnsExpression( IReadOnlyList? readerColumns, ILiftableConstantFactory liftableConstantFactory) diff --git a/src/EFCore/ChangeTracking/EntityEntry.cs b/src/EFCore/ChangeTracking/EntityEntry.cs index 70fd20516f0..f01bc20ebff 100644 --- a/src/EFCore/ChangeTracking/EntityEntry.cs +++ b/src/EFCore/ChangeTracking/EntityEntry.cs @@ -24,7 +24,7 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking; [DebuggerDisplay("{" + nameof(InternalEntry) + ",nq}")] public class EntityEntry : IInfrastructure { - private static readonly int MaxEntityState = Enum.GetValues(typeof(EntityState)).Cast().Max(); + private static readonly int MaxEntityState = Enum.GetValuesAsUnderlyingType().Cast().Max(); private IEntityFinder? _finder; /// diff --git a/src/EFCore/DbContext.cs b/src/EFCore/DbContext.cs index 7554435e6fc..12f82a0d806 100644 --- a/src/EFCore/DbContext.cs +++ b/src/EFCore/DbContext.cs @@ -4,7 +4,6 @@ using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; @@ -298,7 +297,7 @@ object IDbSetCache.GetOrAddSet( { CheckDisposed(); - _sets ??= new Dictionary<(Type Type, string? Name), object>(); + _sets ??= []; if (!_sets.TryGetValue((type, null), out var set)) { @@ -324,7 +323,7 @@ object IDbSetCache.GetOrAddSet( { CheckDisposed(); - _sets ??= new Dictionary<(Type Type, string? Name), object>(); + _sets ??= []; if (!_sets.TryGetValue((type, entityTypeName), out var set)) { @@ -1016,7 +1015,7 @@ async Task IResettableService.ResetStateAsync(CancellationToken cancellationToke } [MethodImpl(MethodImplOptions.AggressiveInlining)] - private IEnumerable GetResettableServices() + private List GetResettableServices() { if (_cachedResettableServices is not null) { diff --git a/src/EFCore/Infrastructure/Uniquifier.cs b/src/EFCore/Infrastructure/Uniquifier.cs index c3449a9e2e3..dcede1f8d55 100644 --- a/src/EFCore/Infrastructure/Uniquifier.cs +++ b/src/EFCore/Infrastructure/Uniquifier.cs @@ -28,6 +28,39 @@ public static string Uniquify( int maxLength) => Uniquify(currentIdentifier, otherIdentifiers, s => s, maxLength); + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The type of the object the identifier maps to. + /// The base identifier. + /// A dictionary where the identifier will be used as a key. + /// An optional suffix to add after the uniquifier. + /// The maximum length of the identifier. + /// A unique identifier. + public static string Uniquify( + string currentIdentifier, + IReadOnlyDictionary otherIdentifiers, + string? suffix, + int maxLength) + => Uniquify(currentIdentifier, otherIdentifiers, s => s, suffix, maxLength); + + /// + /// Creates a unique identifier by appending a number to the given string. + /// + /// The type of the key that contains the identifier. + /// The type of the object the identifier maps to. + /// The base identifier. + /// A dictionary where the identifier will be used as part of the key. + /// Creates the key object from an identifier. + /// The maximum length of the identifier. + /// A unique identifier. + public static string Uniquify( + string currentIdentifier, + IReadOnlyDictionary otherIdentifiers, + Func keySelector, + int maxLength) + => Uniquify(currentIdentifier, otherIdentifiers, keySelector, suffix: null, maxLength); + /// /// Creates a unique identifier by appending a number to the given string. /// @@ -35,6 +68,7 @@ public static string Uniquify( /// The type of the object the identifier maps to. /// The base identifier. /// A dictionary where the identifier will be used as part of the key. + /// An optional suffix to add after the uniquifier. /// Creates the key object from an identifier. /// The maximum length of the identifier. /// A unique identifier. @@ -42,13 +76,14 @@ public static string Uniquify( string currentIdentifier, IReadOnlyDictionary otherIdentifiers, Func keySelector, + string? suffix, int maxLength) { - var finalIdentifier = Truncate(currentIdentifier, maxLength); - var suffix = 1; + var finalIdentifier = Truncate(currentIdentifier, maxLength, suffix); + var uniquifier = 1; while (otherIdentifiers.ContainsKey(keySelector(finalIdentifier))) { - finalIdentifier = Truncate(currentIdentifier, maxLength, suffix++); + finalIdentifier = Truncate(currentIdentifier, maxLength, suffix, uniquifier++); } return finalIdentifier; diff --git a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs index 42338e3cda4..76e06988b3e 100644 --- a/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore/Query/ShapedQueryCompilingExpressionVisitor.cs @@ -126,14 +126,14 @@ protected override Expression VisitExtension(Expression extensionExpression) } private static readonly MethodInfo SingleAsyncMethodInfo - = typeof(ShapedQueryCompilingExpressionVisitor).GetTypeInfo() - .GetDeclaredMethods(nameof(SingleAsync)) - .Single(mi => mi.GetParameters().Length == 2); + = typeof(ShapedQueryCompilingExpressionVisitor) + .GetMethods() + .Single(mi => mi.Name == nameof(SingleAsync) && mi.GetParameters().Length == 2); private static readonly MethodInfo SingleOrDefaultAsyncMethodInfo - = typeof(ShapedQueryCompilingExpressionVisitor).GetTypeInfo() - .GetDeclaredMethods(nameof(SingleOrDefaultAsync)) - .Single(mi => mi.GetParameters().Length == 2); + = typeof(ShapedQueryCompilingExpressionVisitor) + .GetMethods() + .Single(mi => mi.Name == nameof(SingleOrDefaultAsync) && mi.GetParameters().Length == 2); /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to diff --git a/src/Shared/HashHelpers.cs b/src/Shared/HashHelpers.cs index edd236e18e7..54de715c314 100644 --- a/src/Shared/HashHelpers.cs +++ b/src/Shared/HashHelpers.cs @@ -109,7 +109,7 @@ public static int ExpandPrime(int oldSize) // Note that this check works even when _items.Length overflowed thanks to the (uint) cast if ((uint)newSize > MaxPrimeArrayLength && MaxPrimeArrayLength > oldSize) { - Debug.Assert(MaxPrimeArrayLength == GetPrime(MaxPrimeArrayLength), "Invalid MaxPrimeArrayLength"); + Check.DebugAssert(MaxPrimeArrayLength == GetPrime(MaxPrimeArrayLength), "Invalid MaxPrimeArrayLength"); return MaxPrimeArrayLength; } diff --git a/src/Shared/SharedTypeExtensions.cs b/src/Shared/SharedTypeExtensions.cs index f1aa698fdeb..868e9c999b1 100644 --- a/src/Shared/SharedTypeExtensions.cs +++ b/src/Shared/SharedTypeExtensions.cs @@ -10,7 +10,6 @@ // ReSharper disable once CheckNamespace namespace System; -[DebuggerStepThrough] internal static class SharedTypeExtensions { private static readonly Dictionary BuiltInTypeNames = new() @@ -504,6 +503,10 @@ private static void ProcessType(StringBuilder builder, Type type, bool fullName, builder.Append(fullName ? type.FullName : type.Name); } } + else if (compilable) + { + builder.Append(type.Name); + } } private static void ProcessArrayType(StringBuilder builder, Type type, bool fullName, bool compilable) diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataEntityType.cs index 09b25359a0d..3231aa88c7e 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataEntityType.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataEntityType.cs @@ -5,7 +5,6 @@ using System.Globalization; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; @@ -42,11 +41,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadShadowValue(0), + int (InternalEntityEntry entry) => entry.ReadShadowValue(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -55,17 +54,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); @@ -76,11 +75,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, providerPropertyType: typeof(string)); partitionId.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(partitionId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue>(partitionId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + long? (InternalEntityEntry entry) => entry.ReadShadowValue(1), + long? (InternalEntityEntry entry) => entry.ReadShadowValue(1), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(partitionId, 1), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(partitionId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); partitionId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -89,25 +88,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); partitionId.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (long v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => long.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (long v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + long (string v) => long.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (long v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => long.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (long v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + long (string v) => long.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); partitionId.SetValueComparer(new NullableValueComparer(partitionId.TypeMapping.Comparer)); partitionId.SetKeyValueComparer(new NullableValueComparer(partitionId.TypeMapping.KeyComparer)); partitionId.SetCurrentValueComparer(new EntryCurrentValueComparer(partitionId)); @@ -119,20 +118,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(blob, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue(blob), - (ValueBuffer valueBuffer) => valueBuffer[2]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(blob, 2), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(blob), + object (ValueBuffer valueBuffer) => valueBuffer[2]); blob.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -141,27 +140,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (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()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)), + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)))); + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); blob.AddAnnotation("Cosmos:PropertyName", "JsonBlob"); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var __id = runtimeEntityType.AddProperty( "__id", @@ -169,11 +167,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new IdValueGeneratorFactory().Create); __id.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(2), - (InternalEntityEntry entry) => entry.ReadShadowValue(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => entry.ReadShadowValue(2), + string (InternalEntityEntry entry) => entry.ReadShadowValue(2), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 3), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); __id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -182,17 +180,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); __id.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); @@ -206,11 +204,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); __jObject.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue(0) : entry.FlaggedAsTemporary(4) && entry.ReadShadowValue(3) == null ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(3), - (InternalEntityEntry entry) => entry.ReadShadowValue(3), - (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), - (ValueBuffer valueBuffer) => valueBuffer[4]); + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(4) && entry.ReadShadowValue(3) == null ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(3))), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(3), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 4), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[4]); __jObject.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -219,17 +217,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), keyComparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), providerValueComparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), clrType: typeof(JObject)); __jObject.AddAnnotation("Cosmos:PropertyName", ""); @@ -242,11 +240,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); _etag.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue(1) : entry.FlaggedAsTemporary(5) && entry.ReadShadowValue(4) == null ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(4), - (InternalEntityEntry entry) => entry.ReadShadowValue(4), - (InternalEntityEntry entry) => entry.ReadOriginalValue(_etag, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue(_etag), - (ValueBuffer valueBuffer) => valueBuffer[5]); + string (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(5) && entry.ReadShadowValue(4) == null ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(4))), + string (InternalEntityEntry entry) => entry.ReadShadowValue(4), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(_etag, 5), + string (InternalEntityEntry entry) => entry.GetCurrentValue(_etag), + object (ValueBuffer valueBuffer) => valueBuffer[5]); _etag.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -255,17 +253,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); _etag.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); @@ -294,24 +292,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key0)); key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key0)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot, byte[], string, JObject, string>(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue>(partitionId) == null ? null : ((ValueComparer>)((IProperty)partitionId).GetValueComparer()).Snapshot(source.GetCurrentValue>(partitionId)), source.GetCurrentValue(blob) == null ? null : ((ValueComparer)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue(blob)), source.GetCurrentValue(__id) == null ? null : ((ValueComparer)((IProperty)__id).GetValueComparer()).Snapshot(source.GetCurrentValue(__id)), source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)((IProperty)__jObject).GetValueComparer()).Snapshot(source.GetCurrentValue(__jObject)), source.GetCurrentValue(_etag) == null ? null : ((ValueComparer)((IProperty)_etag).GetValueComparer()).Snapshot(source.GetCurrentValue(_etag))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(partitionId) == null ? null : ((ValueComparer)(((IProperty)partitionId).GetValueComparer())).Snapshot(source.GetCurrentValue(partitionId))), (source.GetCurrentValue(blob) == null ? null : ((ValueComparer)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue(blob))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject))), (source.GetCurrentValue(_etag) == null ? null : ((ValueComparer)(((IProperty)_etag).GetValueComparer())).Snapshot(source.GetCurrentValue(_etag)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(default(JObject) == null ? null : ((ValueComparer)((IProperty)__jObject).GetValueComparer()).Snapshot(default(JObject)), default(string) == null ? null : ((ValueComparer)((IProperty)_etag).GetValueComparer()).Snapshot(default(string)))); + ISnapshot () => ((ISnapshot)(new Snapshot((default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))), (default(string) == null ? null : ((ValueComparer)(((IProperty)_etag).GetValueComparer())).Snapshot(default(string))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(JObject), default(string))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(JObject), default(string))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot, string, JObject, string>(source.ContainsKey("Id") ? (int)source["Id"] : 0, source.ContainsKey("PartitionId") ? (Nullable)source["PartitionId"] : null, source.ContainsKey("__id") ? (string)source["__id"] : null, source.ContainsKey("__jObject") ? (JObject)source["__jObject"] : null, source.ContainsKey("_etag") ? (string)source["_etag"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0), (source.ContainsKey("PartitionId") ? ((long? )(source["PartitionId"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null), (source.ContainsKey("_etag") ? ((string)(source["_etag"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot, string, JObject, string>(default(int), default(Nullable), default(string), default(JObject), default(string))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(int), default(long? ), default(string), default(JObject), default(string))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot, string>(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue>(partitionId) == null ? null : ((ValueComparer>)((IProperty)partitionId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue>(partitionId)), source.GetCurrentValue(__id) == null ? null : ((ValueComparer)((IProperty)__id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(__id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(partitionId) == null ? null : ((ValueComparer)(((IProperty)partitionId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(partitionId))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id)))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 6, @@ -329,8 +327,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/Basic_cosmos_model/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextAssemblyAttributes.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextAssemblyAttributes.cs new file mode 100644 index 00000000000..c224873f6fa --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextAssemblyAttributes.cs @@ -0,0 +1,9 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using TestNamespace; + +#pragma warning disable 219, 612, 618 +#nullable disable + +[assembly: DbContextModel(typeof(DbContext), typeof(DbContextModel))] diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModel.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModel.cs new file mode 100644 index 00000000000..583ee4d90cc --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModel.cs @@ -0,0 +1,48 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [DbContext(typeof(DbContext))] + public partial class DbContextModel : RuntimeModel + { + private static readonly bool _useOldBehavior31751 = + System.AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue31751", out var enabled31751) && enabled31751; + + static DbContextModel() + { + var model = new DbContextModel(); + + if (_useOldBehavior31751) + { + model.Initialize(); + } + else + { + var thread = new System.Threading.Thread(RunInitialization, 10 * 1024 * 1024); + thread.Start(); + thread.Join(); + + void RunInitialization() + { + model.Initialize(); + } + } + + model.Customize(); + _instance = (DbContextModel)model.FinalizeModel(); + } + + private static DbContextModel _instance; + public static IModel Instance => _instance; + + partial void Initialize(); + + partial void Customize(); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs new file mode 100644 index 00000000000..f13b59f63c7 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs @@ -0,0 +1,51 @@ +// +using System; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public partial class DbContextModel + { + private DbContextModel() + : base(skipDetectChanges: false, modelId: new Guid("00000000-0000-0000-0000-000000000000"), entityTypeCount: 8) + { + } + + partial void Initialize() + { + var dependentBase = DependentBaseEntityType.Create(this); + var manyTypes = ManyTypesEntityType.Create(this); + var principalBase = PrincipalBaseEntityType.Create(this); + var ownedType = OwnedTypeEntityType.Create(this); + var ownedType0 = OwnedType0EntityType.Create(this); + var principalBasePrincipalDerivedDependentBasebyte = PrincipalBasePrincipalDerivedDependentBasebyteEntityType.Create(this); + var dependentDerived = DependentDerivedEntityType.Create(this, dependentBase); + var principalDerived = PrincipalDerivedEntityType.Create(this, principalBase); + + DependentBaseEntityType.CreateForeignKey1(dependentBase, principalBase); + DependentBaseEntityType.CreateForeignKey2(dependentBase, principalDerived); + OwnedTypeEntityType.CreateForeignKey1(ownedType, principalBase); + OwnedType0EntityType.CreateForeignKey1(ownedType0, principalDerived); + PrincipalBasePrincipalDerivedDependentBasebyteEntityType.CreateForeignKey1(principalBasePrincipalDerivedDependentBasebyte, principalDerived); + PrincipalBasePrincipalDerivedDependentBasebyteEntityType.CreateForeignKey2(principalBasePrincipalDerivedDependentBasebyte, principalBase); + + PrincipalBaseEntityType.CreateSkipNavigation1(principalBase, principalDerived, principalBasePrincipalDerivedDependentBasebyte); + PrincipalDerivedEntityType.CreateSkipNavigation1(principalDerived, principalBase, principalBasePrincipalDerivedDependentBasebyte); + + DependentBaseEntityType.CreateAnnotations(dependentBase); + ManyTypesEntityType.CreateAnnotations(manyTypes); + PrincipalBaseEntityType.CreateAnnotations(principalBase); + OwnedTypeEntityType.CreateAnnotations(ownedType); + OwnedType0EntityType.CreateAnnotations(ownedType0); + PrincipalBasePrincipalDerivedDependentBasebyteEntityType.CreateAnnotations(principalBasePrincipalDerivedDependentBasebyte); + DependentDerivedEntityType.CreateAnnotations(dependentDerived); + PrincipalDerivedEntityType.CreateAnnotations(principalDerived); + + AddAnnotation("Cosmos:ContainerName", "DbContext"); + } + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs new file mode 100644 index 00000000000..cee5a3c9319 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs @@ -0,0 +1,411 @@ +// +using System; +using System.Collections.Generic; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.EntityFrameworkCore.ValueGeneration; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class DependentBaseEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+DependentBase", + typeof(CompiledModelTestBase.DependentBase), + baseEntityType, + discriminatorProperty: "EnumDiscriminator", + discriminatorValue: CompiledModelTestBase.Enum1.One, + derivedTypesCount: 1, + propertyCount: 6, + navigationCount: 1, + foreignKeyCount: 2, + keyCount: 2); + + var principalId = runtimeEntityType.AddProperty( + "PrincipalId", + typeof(long), + afterSaveBehavior: PropertySaveBehavior.Throw, + sentinel: 0L); + principalId.SetAccessors( + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue(0) == 0L ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue(principalId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + principalId.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: 0, + relationshipIndex: 0, + storeGenerationIndex: 0); + principalId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + principalId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalId)); + + var principalAlternateId = runtimeEntityType.AddProperty( + "PrincipalAlternateId", + typeof(Guid), + afterSaveBehavior: PropertySaveBehavior.Throw); + principalAlternateId.SetAccessors( + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(principalAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + principalAlternateId.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: 1, + relationshipIndex: 1, + storeGenerationIndex: 1); + principalAlternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + principalAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalAlternateId)); + principalAlternateId.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var enumDiscriminator = runtimeEntityType.AddProperty( + "EnumDiscriminator", + typeof(CompiledModelTestBase.Enum1), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); + enumDiscriminator.SetAccessors( + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumDiscriminator, 2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.GetCurrentValue(enumDiscriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + enumDiscriminator.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: 2, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumDiscriminator.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))))); + enumDiscriminator.SetSentinelFromProviderValue(0); + + var id = runtimeEntityType.AddProperty( + "Id", + typeof(byte?), + propertyInfo: typeof(CompiledModelTestBase.DependentBase).GetProperty("Id", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.DependentBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + id.SetGetter( + byte? (CompiledModelTestBase.DependentBase entity) => DependentBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.DependentBase entity) => !(DependentBaseUnsafeAccessors.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase instance) => DependentBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.DependentBase instance) => !(DependentBaseUnsafeAccessors.Id(instance).HasValue)); + id.SetSetter( + (CompiledModelTestBase.DependentBase entity, byte? value) => DependentBaseUnsafeAccessors.Id(entity) = value); + id.SetMaterializationSetter( + (CompiledModelTestBase.DependentBase entity, byte? value) => DependentBaseUnsafeAccessors.Id(entity) = value); + id.SetAccessors( + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Id(((CompiledModelTestBase.DependentBase)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Id(((CompiledModelTestBase.DependentBase)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 3), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue(id), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + id.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance); + id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); + id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); + + var __id = runtimeEntityType.AddProperty( + "__id", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new IdValueGeneratorFactory().Create); + __id.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(3), + string (InternalEntityEntry entry) => entry.ReadShadowValue(3), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 4), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + __id.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: 3, + relationshipIndex: 2, + storeGenerationIndex: -1); + __id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); + __id.AddAnnotation("Cosmos:PropertyName", "id"); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + nullable: true); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(4), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(4), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 5), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + __jObject.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: 4, + relationshipIndex: -1, + storeGenerationIndex: -1); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var key = runtimeEntityType.AddKey( + new[] { __id }); + + var key0 = runtimeEntityType.AddKey( + new[] { principalId, principalAlternateId }); + runtimeEntityType.SetPrimaryKey(key0); + + return runtimeEntityType; + } + + public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id") }), + principalEntityType, + deleteBehavior: DeleteBehavior.Cascade, + unique: true, + required: true); + + return runtimeForeignKey; + } + + public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalId"), declaringEntityType.FindProperty("PrincipalAlternateId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id"), principalEntityType.FindProperty("AlternateId") }), + principalEntityType, + deleteBehavior: DeleteBehavior.ClientNoAction, + unique: true, + required: true); + + var principal = declaringEntityType.AddNavigation("Principal", + runtimeForeignKey, + onDependent: true, + typeof(CompiledModelTestBase.PrincipalDerived>), + propertyInfo: typeof(CompiledModelTestBase.DependentBase).GetProperty("Principal", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.DependentBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + + principal.SetGetter( + CompiledModelTestBase.PrincipalDerived> (CompiledModelTestBase.DependentBase entity) => DependentBaseUnsafeAccessors.Principal(entity), + bool (CompiledModelTestBase.DependentBase entity) => DependentBaseUnsafeAccessors.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived> (CompiledModelTestBase.DependentBase instance) => DependentBaseUnsafeAccessors.Principal(instance), + bool (CompiledModelTestBase.DependentBase instance) => DependentBaseUnsafeAccessors.Principal(instance) == null); + principal.SetSetter( + (CompiledModelTestBase.DependentBase entity, CompiledModelTestBase.PrincipalDerived> value) => DependentBaseUnsafeAccessors.Principal(entity) = value); + principal.SetMaterializationSetter( + (CompiledModelTestBase.DependentBase entity, CompiledModelTestBase.PrincipalDerived> value) => DependentBaseUnsafeAccessors.Principal(entity) = value); + principal.SetAccessors( + CompiledModelTestBase.PrincipalDerived> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Principal(((CompiledModelTestBase.DependentBase)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Principal(((CompiledModelTestBase.DependentBase)(entry.Entity))), + null, + CompiledModelTestBase.PrincipalDerived> (InternalEntityEntry entry) => entry.GetCurrentValue>>(principal), + null); + principal.SetPropertyIndexes( + index: 0, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 3, + storeGenerationIndex: -1); + var dependent = principalEntityType.AddNavigation("Dependent", + runtimeForeignKey, + onDependent: false, + typeof(CompiledModelTestBase.DependentBase), + propertyInfo: typeof(CompiledModelTestBase.PrincipalDerived>).GetProperty("Dependent", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived>).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + eagerLoaded: true, + lazyLoadingEnabled: false); + + dependent.SetGetter( + CompiledModelTestBase.DependentBase (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.Dependent(instance) == null); + dependent.SetSetter( + (CompiledModelTestBase.PrincipalDerived> entity, CompiledModelTestBase.DependentBase value) => PrincipalDerivedUnsafeAccessors>.Dependent(entity) = value); + dependent.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalDerived> entity, CompiledModelTestBase.DependentBase value) => PrincipalDerivedUnsafeAccessors>.Dependent(entity) = value); + dependent.SetAccessors( + CompiledModelTestBase.DependentBase (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.Dependent(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + CompiledModelTestBase.DependentBase (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.Dependent(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + null, + CompiledModelTestBase.DependentBase (InternalEntityEntry entry) => entry.GetCurrentValue>(dependent), + null); + dependent.SetPropertyIndexes( + index: 2, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 5, + storeGenerationIndex: -1); + return runtimeForeignKey; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var principalId = runtimeEntityType.FindProperty("PrincipalId")!; + var principalAlternateId = runtimeEntityType.FindProperty("PrincipalAlternateId")!; + var enumDiscriminator = runtimeEntityType.FindProperty("EnumDiscriminator")!; + var id = runtimeEntityType.FindProperty("Id")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var key = runtimeEntityType.FindKey(new[] { __id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); + var key0 = runtimeEntityType.FindKey(new[] { principalId, principalAlternateId }); + key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key0)); + key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key0)); + var principal = runtimeEntityType.FindNavigation("Principal")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity = ((CompiledModelTestBase.DependentBase)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalId)), ((ValueComparer)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalAlternateId)), ((ValueComparer)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(enumDiscriminator)), (source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long), default(Guid))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity = ((CompiledModelTestBase.DependentBase)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalId)), ((ValueComparer)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalAlternateId)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), DependentBaseUnsafeAccessors.Principal(entity)))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 6, + navigationCount: 1, + complexPropertyCount: 0, + originalValueCount: 6, + shadowCount: 5, + relationshipCount: 4, + storeGeneratedCount: 2); + runtimeEntityType.AddAnnotation("Cosmos:ContainerName", "Dependents"); + runtimeEntityType.AddAnnotation("DiscriminatorMappingComplete", false); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived> Principal(CompiledModelTestBase.DependentBase @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs new file mode 100644 index 00000000000..e75871136a9 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs @@ -0,0 +1,162 @@ +// +using System; +using System.Collections.Generic; +using System.Reflection; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class DependentDerivedEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+DependentDerived", + typeof(CompiledModelTestBase.DependentDerived), + baseEntityType, + discriminatorProperty: "EnumDiscriminator", + discriminatorValue: CompiledModelTestBase.Enum1.Two, + propertyCount: 2); + + var data = runtimeEntityType.AddProperty( + "Data", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.DependentDerived).GetProperty("Data", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.DependentDerived).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true, + maxLength: 20, + unicode: false); + data.SetGetter( + string (CompiledModelTestBase.DependentDerived entity) => DependentDerivedUnsafeAccessors.Data(entity), + bool (CompiledModelTestBase.DependentDerived entity) => DependentDerivedUnsafeAccessors.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived instance) => DependentDerivedUnsafeAccessors.Data(instance), + bool (CompiledModelTestBase.DependentDerived instance) => DependentDerivedUnsafeAccessors.Data(instance) == null); + data.SetSetter( + (CompiledModelTestBase.DependentDerived entity, string value) => DependentDerivedUnsafeAccessors.Data(entity) = value); + data.SetMaterializationSetter( + (CompiledModelTestBase.DependentDerived entity, string value) => DependentDerivedUnsafeAccessors.Data(entity) = value); + data.SetAccessors( + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors.Data(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors.Data(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(data, 6), + string (InternalEntityEntry entry) => entry.GetCurrentValue(data), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + data.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + data.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var money = runtimeEntityType.AddProperty( + "Money", + typeof(decimal), + precision: 9, + scale: 3, + sentinel: 0m); + money.SetAccessors( + decimal (InternalEntityEntry entry) => entry.ReadShadowValue(5), + decimal (InternalEntityEntry entry) => entry.ReadShadowValue(5), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue(money, 7), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue(money), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + money.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: 5, + relationshipIndex: -1, + storeGenerationIndex: -1); + money.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + clrType: typeof(decimal), + jsonValueReaderWriter: JsonDecimalReaderWriter.Instance); + + return runtimeEntityType; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var principalId = runtimeEntityType.FindProperty("PrincipalId")!; + var principalAlternateId = runtimeEntityType.FindProperty("PrincipalAlternateId")!; + var enumDiscriminator = runtimeEntityType.FindProperty("EnumDiscriminator")!; + var id = runtimeEntityType.FindProperty("Id")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var data = runtimeEntityType.FindProperty("Data")!; + var money = runtimeEntityType.FindProperty("Money")!; + var principal = runtimeEntityType.FindNavigation("Principal")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.DependentDerived)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalId)), ((ValueComparer)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalAlternateId)), ((ValueComparer)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(enumDiscriminator)), (source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject))), (source.GetCurrentValue(data) == null ? null : ((ValueComparer)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue(data))), ((ValueComparer)(((IProperty)money).GetValueComparer())).Snapshot(source.GetCurrentValue(money))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long), default(Guid))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null), (source.ContainsKey("Money") ? ((decimal)(source["Money"])) : 0M))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(string), default(JObject), default(decimal))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.DependentDerived)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalId)), ((ValueComparer)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalAlternateId)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), DependentBaseUnsafeAccessors.Principal(entity8)))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 8, + navigationCount: 1, + complexPropertyCount: 0, + originalValueCount: 8, + shadowCount: 6, + relationshipCount: 4, + storeGeneratedCount: 2); + runtimeEntityType.AddAnnotation("DiscriminatorMappingComplete", false); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs new file mode 100644 index 00000000000..c5072b8c71b --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs @@ -0,0 +1,15573 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Reflection; +using System.Text; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal; +using Microsoft.EntityFrameworkCore.ValueGeneration; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class ManyTypesEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+ManyTypes", + typeof(CompiledModelTestBase.ManyTypes), + baseEntityType, + discriminatorProperty: "Discriminator", + discriminatorValue: "ManyTypes", + propertyCount: 261, + keyCount: 2); + + var id = runtimeEntityType.AddProperty( + "Id", + typeof(CompiledModelTestBase.ManyTypesId), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueGenerated: ValueGenerated.OnAdd, + afterSaveBehavior: PropertySaveBehavior.Throw, + valueConverter: new CompiledModelTestBase.ManyTypesIdConverter()); + id.SetGetter( + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); + id.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); + id.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); + id.SetAccessors( + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue(0) : ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + id.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: -1, + relationshipIndex: 0, + storeGenerationIndex: 0); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)))); + id.SetCurrentValueComparer(new CurrentProviderValueComparer(id)); + id.SetSentinelFromProviderValue(0); + + var @bool = runtimeEntityType.AddProperty( + "Bool", + typeof(bool), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bool", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: false); + @bool.SetGetter( + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance) == false); + @bool.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); + @bool.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); + @bool.SetAccessors( + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(@bool, 1), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(@bool), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + @bool.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @bool.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + clrType: typeof(bool), + jsonValueReaderWriter: JsonBoolReaderWriter.Instance); + + var boolArray = runtimeEntityType.AddProperty( + "BoolArray", + typeof(bool[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + boolArray.SetGetter( + bool[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity) == null, + bool[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance) == null); + boolArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); + boolArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); + boolArray.SetAccessors( + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => entry.ReadOriginalValue(boolArray, 2), + bool[] (InternalEntityEntry entry) => entry.GetCurrentValue(boolArray), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + boolArray.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), + keyComparer: new ValueComparer( + bool (bool[] v1, bool[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[] (bool[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (bool[] v1, bool[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[] (bool[] source) => source.ToArray()), + clrType: typeof(bool[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + clrType: typeof(bool), + jsonValueReaderWriter: JsonBoolReaderWriter.Instance)); + + 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( + bool[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) == null, + bool[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance) == null); + boolNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); + boolNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); + boolNestedCollection.SetAccessors( + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(boolNestedCollection, 3), + bool[][] (InternalEntityEntry entry) => entry.GetCurrentValue(boolNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + boolNestedCollection.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), + keyComparer: new ValueComparer( + bool (bool[][] v1, bool[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[][] (bool[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (bool[][] v1, bool[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[][] (bool[][] source) => source.ToArray()), + clrType: typeof(bool[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), + keyComparer: new ValueComparer( + bool (bool[] v1, bool[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[] (bool[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (bool[] v1, bool[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool[] (bool[] source) => source.ToArray()), + clrType: typeof(bool[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + clrType: typeof(bool), + jsonValueReaderWriter: JsonBoolReaderWriter.Instance))); + + var boolToStringConverterProperty = runtimeEntityType.AddProperty( + "BoolToStringConverterProperty", + typeof(bool), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + boolToStringConverterProperty.SetGetter( + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance) == false); + boolToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); + boolToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); + boolToStringConverterProperty.SetAccessors( + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToStringConverterProperty, 4), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(boolToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + boolToStringConverterProperty.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))))); + boolToStringConverterProperty.SetSentinelFromProviderValue("A"); + + var boolToTwoValuesConverterProperty = runtimeEntityType.AddProperty( + "BoolToTwoValuesConverterProperty", + typeof(bool), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToTwoValuesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + boolToTwoValuesConverterProperty.SetGetter( + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance) == false); + boolToTwoValuesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); + boolToTwoValuesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); + boolToTwoValuesConverterProperty.SetAccessors( + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToTwoValuesConverterProperty, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(boolToTwoValuesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + boolToTwoValuesConverterProperty.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolToTwoValuesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1))); + boolToTwoValuesConverterProperty.SetSentinelFromProviderValue((byte)0); + + var boolToZeroOneConverterProperty = runtimeEntityType.AddProperty( + "BoolToZeroOneConverterProperty", + typeof(bool), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToZeroOneConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new BoolToZeroOneConverter()); + boolToZeroOneConverterProperty.SetGetter( + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance) == false); + boolToZeroOneConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); + boolToZeroOneConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); + boolToZeroOneConverterProperty.SetAccessors( + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToZeroOneConverterProperty, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(boolToZeroOneConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + boolToZeroOneConverterProperty.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolToZeroOneConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1))); + boolToZeroOneConverterProperty.SetSentinelFromProviderValue((short)0); + + var bytes = runtimeEntityType.AddProperty( + "Bytes", + typeof(byte[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + bytes.SetGetter( + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance) == null); + bytes.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); + bytes.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); + bytes.SetAccessors( + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(bytes, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(bytes), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + bytes.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytes.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); + + var bytesArray = runtimeEntityType.AddProperty( + "BytesArray", + typeof(byte[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + bytesArray.SetGetter( + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance) == null); + bytesArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); + bytesArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); + bytesArray.SetAccessors( + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesArray, 8), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue(bytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); + bytesArray.SetPropertyIndexes( + index: 8, + originalValueIndex: 8, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytesArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), + keyComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + clrType: typeof(byte[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v))))); + + 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( + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance) == null); + bytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); + bytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); + bytesNestedCollection.SetAccessors( + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesNestedCollection, 9), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue(bytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[9]); + bytesNestedCollection.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytesNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), + keyComparer: new ValueComparer( + bool (byte[][][] v1, byte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][][] (byte[][][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][][] v1, byte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][][] (byte[][][] source) => source.ToArray()), + clrType: typeof(byte[][][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), + keyComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + clrType: typeof(byte[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))))); + + var bytesToStringConverterProperty = runtimeEntityType.AddProperty( + "BytesToStringConverterProperty", + typeof(byte[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new BytesToStringConverter(), + valueComparer: new ArrayStructuralComparer()); + bytesToStringConverterProperty.SetGetter( + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance) == null); + bytesToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); + bytesToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); + bytesToStringConverterProperty.SetAccessors( + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesToStringConverterProperty, 10), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(bytesToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[10]); + bytesToStringConverterProperty.SetPropertyIndexes( + index: 10, + originalValueIndex: 10, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytesToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); + + var castingConverterProperty = runtimeEntityType.AddProperty( + "CastingConverterProperty", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CastingConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new CastingConverter()); + castingConverterProperty.SetGetter( + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance) == 0); + castingConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); + castingConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); + castingConverterProperty.SetAccessors( + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(castingConverterProperty, 11), + int (InternalEntityEntry entry) => entry.GetCurrentValue(castingConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[11]); + castingConverterProperty.SetPropertyIndexes( + index: 11, + originalValueIndex: 11, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + castingConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + converter: new ValueConverter( + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))))); + castingConverterProperty.SetSentinelFromProviderValue(0m); + + var @char = runtimeEntityType.AddProperty( + "Char", + typeof(char), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Char", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: '\0'); + @char.SetGetter( + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance) == '\0'); + @char.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); + @char.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); + @char.SetAccessors( + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue(@char, 12), + char (InternalEntityEntry entry) => entry.GetCurrentValue(@char), + object (ValueBuffer valueBuffer) => valueBuffer[12]); + @char.SetPropertyIndexes( + index: 12, + originalValueIndex: 12, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @char.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + clrType: typeof(char), + jsonValueReaderWriter: JsonCharReaderWriter.Instance); + + var charArray = runtimeEntityType.AddProperty( + "CharArray", + typeof(char[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + charArray.SetGetter( + char[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity) == null, + char[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance) == null); + charArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); + charArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); + charArray.SetAccessors( + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => entry.ReadOriginalValue(charArray, 13), + char[] (InternalEntityEntry entry) => entry.GetCurrentValue(charArray), + object (ValueBuffer valueBuffer) => valueBuffer[13]); + charArray.SetPropertyIndexes( + index: 13, + originalValueIndex: 13, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + charArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), + keyComparer: new ValueComparer( + bool (char[] v1, char[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[] (char[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (char[] v1, char[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[] (char[] source) => source.ToArray()), + clrType: typeof(char[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonCharReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + clrType: typeof(char), + jsonValueReaderWriter: JsonCharReaderWriter.Instance)); + + 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( + char[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) == null, + char[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance) == null); + charNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); + charNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); + charNestedCollection.SetAccessors( + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(charNestedCollection, 14), + char[][] (InternalEntityEntry entry) => entry.GetCurrentValue(charNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[14]); + charNestedCollection.SetPropertyIndexes( + index: 14, + originalValueIndex: 14, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + charNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), + keyComparer: new ValueComparer( + bool (char[][] v1, char[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[][] (char[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (char[][] v1, char[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[][] (char[][] source) => source.ToArray()), + clrType: typeof(char[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonCharReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), + keyComparer: new ValueComparer( + bool (char[] v1, char[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[] (char[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (char[] v1, char[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char[] (char[] source) => source.ToArray()), + clrType: typeof(char[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonCharReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + clrType: typeof(char), + jsonValueReaderWriter: JsonCharReaderWriter.Instance))); + + var charToStringConverterProperty = runtimeEntityType.AddProperty( + "CharToStringConverterProperty", + typeof(char), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new CharToStringConverter()); + charToStringConverterProperty.SetGetter( + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance) == '\0'); + charToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); + charToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); + charToStringConverterProperty.SetAccessors( + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue(charToStringConverterProperty, 15), + char (InternalEntityEntry entry) => entry.GetCurrentValue(charToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[15]); + charToStringConverterProperty.SetPropertyIndexes( + index: 15, + originalValueIndex: 15, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + charToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); + charToStringConverterProperty.SetSentinelFromProviderValue("\0"); + + var dateOnly = runtimeEntityType.AddProperty( + "DateOnly", + typeof(DateOnly), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnly", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: new DateOnly(1, 1, 1)); + dateOnly.SetGetter( + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance) == default(DateOnly)); + dateOnly.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); + dateOnly.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); + dateOnly.SetAccessors( + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnly, 16), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[16]); + dateOnly.SetPropertyIndexes( + index: 16, + originalValueIndex: 16, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateOnly.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + keyComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + providerValueComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + clrType: typeof(DateOnly), + jsonValueReaderWriter: JsonDateOnlyReaderWriter.Instance); + + var dateOnlyArray = runtimeEntityType.AddProperty( + "DateOnlyArray", + typeof(DateOnly[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + dateOnlyArray.SetGetter( + DateOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) == null, + DateOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance) == null); + dateOnlyArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); + dateOnlyArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); + dateOnlyArray.SetAccessors( + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyArray, 17), + DateOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); + dateOnlyArray.SetPropertyIndexes( + index: 17, + originalValueIndex: 17, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateOnlyArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), + keyComparer: new ValueComparer( + bool (DateOnly[] v1, DateOnly[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateOnly[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateOnly[] (DateOnly[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateOnly[] v1, DateOnly[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateOnly[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateOnly[] (DateOnly[] source) => source.ToArray()), + clrType: typeof(DateOnly[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateOnlyReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + keyComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + providerValueComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + clrType: typeof(DateOnly), + jsonValueReaderWriter: JsonDateOnlyReaderWriter.Instance)); + + var dateOnlyToStringConverterProperty = runtimeEntityType.AddProperty( + "DateOnlyToStringConverterProperty", + typeof(DateOnly), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateOnlyToStringConverter()); + dateOnlyToStringConverterProperty.SetGetter( + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance) == default(DateOnly)); + dateOnlyToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); + dateOnlyToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); + dateOnlyToStringConverterProperty.SetAccessors( + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyToStringConverterProperty, 18), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[18]); + dateOnlyToStringConverterProperty.SetPropertyIndexes( + index: 18, + originalValueIndex: 18, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateOnlyToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + keyComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + dateOnlyToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01"); + + var dateTime = runtimeEntityType.AddProperty( + "DateTime", + typeof(DateTime), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTime", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + dateTime.SetGetter( + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance) == default(DateTime)); + dateTime.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); + dateTime.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); + dateTime.SetAccessors( + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTime, 19), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue(dateTime), + object (ValueBuffer valueBuffer) => valueBuffer[19]); + dateTime.SetPropertyIndexes( + index: 19, + originalValueIndex: 19, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTime.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance); + + var dateTimeArray = runtimeEntityType.AddProperty( + "DateTimeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + dateTimeArray.SetGetter( + DateTime[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity) == null, + DateTime[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance) == null); + dateTimeArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); + dateTimeArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); + dateTimeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeArray, 20), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[20]); + dateTimeArray.SetPropertyIndexes( + index: 20, + originalValueIndex: 20, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.AddProperty( + "DateTimeOffsetToBinaryConverterProperty", + typeof(DateTimeOffset), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeOffsetToBinaryConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateTimeOffsetToBinaryConverter()); + dateTimeOffsetToBinaryConverterProperty.SetGetter( + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + dateTimeOffsetToBinaryConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); + dateTimeOffsetToBinaryConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); + dateTimeOffsetToBinaryConverterProperty.SetAccessors( + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBinaryConverterProperty, 21), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[21]); + dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( + index: 21, + originalValueIndex: 21, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeOffsetToBinaryConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + keyComparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); + dateTimeOffsetToBinaryConverterProperty.SetSentinelFromProviderValue(0L); + + var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.AddProperty( + "DateTimeOffsetToBytesConverterProperty", + typeof(DateTimeOffset), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeOffsetToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateTimeOffsetToBytesConverter()); + dateTimeOffsetToBytesConverterProperty.SetGetter( + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + dateTimeOffsetToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); + dateTimeOffsetToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); + dateTimeOffsetToBytesConverterProperty.SetAccessors( + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBytesConverterProperty, 22), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[22]); + dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( + index: 22, + originalValueIndex: 22, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeOffsetToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + keyComparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (DateTimeOffset v) => Convert.ToBase64String(DateTimeOffsetToBytesConverter.ToBytes(v)), + DateTimeOffset (string v) => DateTimeOffsetToBytesConverter.FromBytes(Convert.FromBase64String(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (DateTimeOffset v) => Convert.ToBase64String(DateTimeOffsetToBytesConverter.ToBytes(v)), + DateTimeOffset (string v) => DateTimeOffsetToBytesConverter.FromBytes(Convert.FromBase64String(v))))); + dateTimeOffsetToBytesConverterProperty.SetSentinelFromProviderValue("AAAAAAAAAAAAAA=="); + + var dateTimeOffsetToStringConverterProperty = runtimeEntityType.AddProperty( + "DateTimeOffsetToStringConverterProperty", + typeof(DateTimeOffset), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeOffsetToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateTimeOffsetToStringConverter()); + dateTimeOffsetToStringConverterProperty.SetGetter( + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + dateTimeOffsetToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); + dateTimeOffsetToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); + dateTimeOffsetToStringConverterProperty.SetAccessors( + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToStringConverterProperty, 23), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[23]); + dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( + index: 23, + originalValueIndex: 23, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeOffsetToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + keyComparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); + dateTimeOffsetToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00+00:00"); + + var dateTimeToBinaryConverterProperty = runtimeEntityType.AddProperty( + "DateTimeToBinaryConverterProperty", + typeof(DateTime), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeToBinaryConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateTimeToBinaryConverter()); + dateTimeToBinaryConverterProperty.SetGetter( + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance) == default(DateTime)); + dateTimeToBinaryConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); + dateTimeToBinaryConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); + dateTimeToBinaryConverterProperty.SetAccessors( + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToBinaryConverterProperty, 24), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[24]); + dateTimeToBinaryConverterProperty.SetPropertyIndexes( + index: 24, + originalValueIndex: 24, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeToBinaryConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)))); + dateTimeToBinaryConverterProperty.SetSentinelFromProviderValue(0L); + + var dateTimeToStringConverterProperty = runtimeEntityType.AddProperty( + "DateTimeToStringConverterProperty", + typeof(DateTime), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new DateTimeToStringConverter()); + dateTimeToStringConverterProperty.SetGetter( + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance) == default(DateTime)); + dateTimeToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); + dateTimeToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); + dateTimeToStringConverterProperty.SetAccessors( + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToStringConverterProperty, 25), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[25]); + dateTimeToStringConverterProperty.SetPropertyIndexes( + index: 25, + originalValueIndex: 25, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); + dateTimeToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00"); + + var dateTimeToTicksConverterProperty = runtimeEntityType.AddProperty( + "DateTimeToTicksConverterProperty", + typeof(DateTime), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeToTicksConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + dateTimeToTicksConverterProperty.SetGetter( + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance) == default(DateTime)); + dateTimeToTicksConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); + dateTimeToTicksConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); + dateTimeToTicksConverterProperty.SetAccessors( + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToTicksConverterProperty, 26), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[26]); + dateTimeToTicksConverterProperty.SetPropertyIndexes( + index: 26, + originalValueIndex: 26, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + dateTimeToTicksConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance); + + var @decimal = runtimeEntityType.AddProperty( + "Decimal", + typeof(decimal), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Decimal", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0m); + @decimal.SetGetter( + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance) == 0M); + @decimal.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); + @decimal.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); + @decimal.SetAccessors( + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue(@decimal, 27), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue(@decimal), + object (ValueBuffer valueBuffer) => valueBuffer[27]); + @decimal.SetPropertyIndexes( + index: 27, + originalValueIndex: 27, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @decimal.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + clrType: typeof(decimal), + jsonValueReaderWriter: JsonDecimalReaderWriter.Instance); + + var decimalArray = runtimeEntityType.AddProperty( + "DecimalArray", + typeof(decimal[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + decimalArray.SetGetter( + decimal[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity) == null, + decimal[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance) == null); + decimalArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); + decimalArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); + decimalArray.SetAccessors( + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalArray, 28), + decimal[] (InternalEntityEntry entry) => entry.GetCurrentValue(decimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[28]); + decimalArray.SetPropertyIndexes( + index: 28, + originalValueIndex: 28, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + decimalArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), + keyComparer: new ValueComparer( + bool (decimal[] v1, decimal[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (decimal[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + decimal[] (decimal[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (decimal[] v1, decimal[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (decimal[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + decimal[] (decimal[] source) => source.ToArray()), + clrType: typeof(decimal[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDecimalReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + clrType: typeof(decimal), + jsonValueReaderWriter: JsonDecimalReaderWriter.Instance)); + + var decimalNumberToBytesConverterProperty = runtimeEntityType.AddProperty( + "DecimalNumberToBytesConverterProperty", + typeof(decimal), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalNumberToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToBytesConverter()); + decimalNumberToBytesConverterProperty.SetGetter( + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance) == 0M); + decimalNumberToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); + decimalNumberToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); + decimalNumberToBytesConverterProperty.SetAccessors( + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToBytesConverterProperty, 29), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[29]); + decimalNumberToBytesConverterProperty.SetPropertyIndexes( + index: 29, + originalValueIndex: 29, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + decimalNumberToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (decimal v) => Convert.ToBase64String(NumberToBytesConverter.DecimalToBytes(v)), + decimal (string v) => (Convert.FromBase64String(v) == null ? 0M : NumberToBytesConverter.BytesToDecimal(Convert.FromBase64String(v)))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (decimal v) => Convert.ToBase64String(NumberToBytesConverter.DecimalToBytes(v)), + decimal (string v) => (Convert.FromBase64String(v) == null ? 0M : NumberToBytesConverter.BytesToDecimal(Convert.FromBase64String(v)))))); + decimalNumberToBytesConverterProperty.SetSentinelFromProviderValue("AAAAAAAAAAAAAAAAAAAAAA=="); + + var decimalNumberToStringConverterProperty = runtimeEntityType.AddProperty( + "DecimalNumberToStringConverterProperty", + typeof(decimal), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalNumberToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToStringConverter()); + decimalNumberToStringConverterProperty.SetGetter( + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance) == 0M); + decimalNumberToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); + decimalNumberToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); + decimalNumberToStringConverterProperty.SetAccessors( + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToStringConverterProperty, 30), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[30]); + decimalNumberToStringConverterProperty.SetPropertyIndexes( + index: 30, + originalValueIndex: 30, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + decimalNumberToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + decimalNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); + + var discriminator = runtimeEntityType.AddProperty( + "Discriminator", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); + discriminator.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 31), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[31]); + discriminator.SetPropertyIndexes( + index: 31, + originalValueIndex: 31, + shadowIndex: 0, + relationshipIndex: -1, + storeGenerationIndex: -1); + discriminator.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var @double = runtimeEntityType.AddProperty( + "Double", + typeof(double), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Double", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0.0); + @double.SetGetter( + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance).Equals(0D)); + @double.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); + @double.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); + @double.SetAccessors( + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue(@double, 32), + double (InternalEntityEntry entry) => entry.GetCurrentValue(@double), + object (ValueBuffer valueBuffer) => valueBuffer[32]); + @double.SetPropertyIndexes( + index: 32, + originalValueIndex: 32, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @double.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + clrType: typeof(double), + jsonValueReaderWriter: JsonDoubleReaderWriter.Instance); + + var doubleArray = runtimeEntityType.AddProperty( + "DoubleArray", + typeof(double[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + doubleArray.SetGetter( + double[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity) == null, + double[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance) == null); + doubleArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); + doubleArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); + doubleArray.SetAccessors( + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleArray, 33), + double[] (InternalEntityEntry entry) => entry.GetCurrentValue(doubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[33]); + doubleArray.SetPropertyIndexes( + index: 33, + originalValueIndex: 33, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + doubleArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), + keyComparer: new ValueComparer( + bool (double[] v1, double[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (double[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + double[] (double[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (double[] v1, double[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (double[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + double[] (double[] source) => source.ToArray()), + clrType: typeof(double[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDoubleReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + clrType: typeof(double), + jsonValueReaderWriter: JsonDoubleReaderWriter.Instance)); + + var doubleNumberToBytesConverterProperty = runtimeEntityType.AddProperty( + "DoubleNumberToBytesConverterProperty", + typeof(double), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleNumberToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToBytesConverter()); + doubleNumberToBytesConverterProperty.SetGetter( + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance).Equals(0D)); + doubleNumberToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); + doubleNumberToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); + doubleNumberToBytesConverterProperty.SetAccessors( + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToBytesConverterProperty, 34), + double (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[34]); + doubleNumberToBytesConverterProperty.SetPropertyIndexes( + index: 34, + originalValueIndex: 34, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + doubleNumberToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (double v) => Convert.ToBase64String(NumberToBytesConverter.ReverseLong(BitConverter.GetBytes(v))), + double (string v) => (Convert.FromBase64String(v) == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter.ReverseLong(Convert.FromBase64String(v)), 0))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (double v) => Convert.ToBase64String(NumberToBytesConverter.ReverseLong(BitConverter.GetBytes(v))), + double (string v) => (Convert.FromBase64String(v) == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter.ReverseLong(Convert.FromBase64String(v)), 0))))); + doubleNumberToBytesConverterProperty.SetSentinelFromProviderValue("AAAAAAAAAAA="); + + var doubleNumberToStringConverterProperty = runtimeEntityType.AddProperty( + "DoubleNumberToStringConverterProperty", + typeof(double), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleNumberToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToStringConverter()); + doubleNumberToStringConverterProperty.SetGetter( + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance).Equals(0D)); + doubleNumberToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); + doubleNumberToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); + doubleNumberToStringConverterProperty.SetAccessors( + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToStringConverterProperty, 35), + double (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[35]); + doubleNumberToStringConverterProperty.SetPropertyIndexes( + index: 35, + originalValueIndex: 35, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + doubleNumberToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + doubleNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); + + var enum16 = runtimeEntityType.AddProperty( + "Enum16", + typeof(CompiledModelTestBase.Enum16), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum16.SetGetter( + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); + enum16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); + enum16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); + enum16.SetAccessors( + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16, 36), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue(enum16), + object (ValueBuffer valueBuffer) => valueBuffer[36]); + enum16.SetPropertyIndexes( + index: 36, + originalValueIndex: 36, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); + enum16.SetSentinelFromProviderValue((short)0); + + var enum16Array = runtimeEntityType.AddProperty( + "Enum16Array", + typeof(CompiledModelTestBase.Enum16[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum16Array.SetGetter( + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance) == null); + enum16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); + enum16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); + enum16Array.SetAccessors( + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16Array, 37), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[37]); + enum16Array.SetPropertyIndexes( + index: 37, + originalValueIndex: 37, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16[] v1, CompiledModelTestBase.Enum16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.Enum16[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16[] v1, CompiledModelTestBase.Enum16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.Enum16[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum16[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var enum16AsString = runtimeEntityType.AddProperty( + "Enum16AsString", + typeof(CompiledModelTestBase.Enum16), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enum16AsString.SetGetter( + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); + enum16AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); + enum16AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); + enum16AsString.SetAccessors( + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsString, 38), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[38]); + enum16AsString.SetPropertyIndexes( + index: 38, + originalValueIndex: 38, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enum16AsString.SetSentinelFromProviderValue("Default"); + + var enum16AsStringArray = runtimeEntityType.AddProperty( + "Enum16AsStringArray", + typeof(CompiledModelTestBase.Enum16[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum16AsStringArray.SetGetter( + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance) == null); + enum16AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); + enum16AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); + enum16AsStringArray.SetAccessors( + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsStringArray, 39), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[39]); + enum16AsStringArray.SetPropertyIndexes( + index: 39, + originalValueIndex: 39, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16[] v1, CompiledModelTestBase.Enum16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.Enum16[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16[] v1, CompiledModelTestBase.Enum16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.Enum16[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum16[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum16AsStringCollection = runtimeEntityType.AddProperty( + "Enum16AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum16AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance) == null); + enum16AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); + enum16AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); + enum16AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16AsStringCollection, 40), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[40]); + enum16AsStringCollection.SetPropertyIndexes( + index: 40, + originalValueIndex: 40, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum16Collection = runtimeEntityType.AddProperty( + "Enum16Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum16Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance) == null); + enum16Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); + enum16Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); + enum16Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16Collection, 41), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[41]); + enum16Collection.SetPropertyIndexes( + index: 41, + originalValueIndex: 41, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum16Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var enum32 = runtimeEntityType.AddProperty( + "Enum32", + typeof(CompiledModelTestBase.Enum32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32.SetGetter( + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); + enum32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); + enum32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); + enum32.SetAccessors( + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32, 42), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue(enum32), + object (ValueBuffer valueBuffer) => valueBuffer[42]); + enum32.SetPropertyIndexes( + index: 42, + originalValueIndex: 42, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); + enum32.SetSentinelFromProviderValue(0); + + var enum32Array = runtimeEntityType.AddProperty( + "Enum32Array", + typeof(CompiledModelTestBase.Enum32[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32Array.SetGetter( + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance) == null); + enum32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); + enum32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); + enum32Array.SetAccessors( + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32Array, 43), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[43]); + enum32Array.SetPropertyIndexes( + index: 43, + originalValueIndex: 43, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32[] v1, CompiledModelTestBase.Enum32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.Enum32[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32[] v1, CompiledModelTestBase.Enum32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.Enum32[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + var enum32AsString = runtimeEntityType.AddProperty( + "Enum32AsString", + typeof(CompiledModelTestBase.Enum32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enum32AsString.SetGetter( + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); + enum32AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); + enum32AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); + enum32AsString.SetAccessors( + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsString, 44), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[44]); + enum32AsString.SetPropertyIndexes( + index: 44, + originalValueIndex: 44, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enum32AsString.SetSentinelFromProviderValue("Default"); + + var enum32AsStringArray = runtimeEntityType.AddProperty( + "Enum32AsStringArray", + typeof(CompiledModelTestBase.Enum32[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32AsStringArray.SetGetter( + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance) == null); + enum32AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); + enum32AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); + enum32AsStringArray.SetAccessors( + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsStringArray, 45), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[45]); + enum32AsStringArray.SetPropertyIndexes( + index: 45, + originalValueIndex: 45, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32[] v1, CompiledModelTestBase.Enum32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.Enum32[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32[] v1, CompiledModelTestBase.Enum32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.Enum32[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum32AsStringCollection = runtimeEntityType.AddProperty( + "Enum32AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance) == null); + enum32AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); + enum32AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); + enum32AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32AsStringCollection, 46), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[46]); + enum32AsStringCollection.SetPropertyIndexes( + index: 46, + originalValueIndex: 46, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum32Collection = runtimeEntityType.AddProperty( + "Enum32Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance) == null); + enum32Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); + enum32Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); + enum32Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32Collection, 47), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[47]); + enum32Collection.SetPropertyIndexes( + index: 47, + originalValueIndex: 47, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + 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( + List[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) == null, + List[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance) == null); + enum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); + enum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); + enum32NestedCollection.SetAccessors( + List[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List[][] (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(enum32NestedCollection, 48), + List[][] (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(enum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[48]); + enum32NestedCollection.SetPropertyIndexes( + index: 48, + originalValueIndex: 48, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[][], List[]>(new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), + keyComparer: new ValueComparer[][]>( + bool (List[][] v1, List[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (List[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + List[][] (List[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer[][]>( + bool (List[][] v1, List[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (List[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + List[][] (List[][] source) => source.ToArray()), + clrType: typeof(List[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[][], List[]>( + new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer[]>( + bool (List[] v1, List[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (List[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + List[] (List[] source) => source.ToArray()), + providerValueComparer: new ValueComparer[]>( + bool (List[] v1, List[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (List[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + List[] (List[] source) => source.ToArray()), + clrType: typeof(List[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); + + var enum64 = runtimeEntityType.AddProperty( + "Enum64", + typeof(CompiledModelTestBase.Enum64), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum64.SetGetter( + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); + enum64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); + enum64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); + enum64.SetAccessors( + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64, 49), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue(enum64), + object (ValueBuffer valueBuffer) => valueBuffer[49]); + enum64.SetPropertyIndexes( + index: 49, + originalValueIndex: 49, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); + enum64.SetSentinelFromProviderValue(0L); + + var enum64Array = runtimeEntityType.AddProperty( + "Enum64Array", + typeof(CompiledModelTestBase.Enum64[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum64Array.SetGetter( + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance) == null); + enum64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); + enum64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); + enum64Array.SetAccessors( + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64Array, 50), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[50]); + enum64Array.SetPropertyIndexes( + index: 50, + originalValueIndex: 50, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64[] v1, CompiledModelTestBase.Enum64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.Enum64[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64[] v1, CompiledModelTestBase.Enum64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.Enum64[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum64[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var enum64AsString = runtimeEntityType.AddProperty( + "Enum64AsString", + typeof(CompiledModelTestBase.Enum64), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enum64AsString.SetGetter( + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); + enum64AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); + enum64AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); + enum64AsString.SetAccessors( + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsString, 51), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[51]); + enum64AsString.SetPropertyIndexes( + index: 51, + originalValueIndex: 51, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enum64AsString.SetSentinelFromProviderValue("Default"); + + var enum64AsStringArray = runtimeEntityType.AddProperty( + "Enum64AsStringArray", + typeof(CompiledModelTestBase.Enum64[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum64AsStringArray.SetGetter( + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance) == null); + enum64AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); + enum64AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); + enum64AsStringArray.SetAccessors( + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsStringArray, 52), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[52]); + enum64AsStringArray.SetPropertyIndexes( + index: 52, + originalValueIndex: 52, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64[] v1, CompiledModelTestBase.Enum64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.Enum64[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64[] v1, CompiledModelTestBase.Enum64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.Enum64[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum64[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum64AsStringCollection = runtimeEntityType.AddProperty( + "Enum64AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum64AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance) == null); + enum64AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); + enum64AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); + enum64AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64AsStringCollection, 53), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[53]); + enum64AsStringCollection.SetPropertyIndexes( + index: 53, + originalValueIndex: 53, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum64Collection = runtimeEntityType.AddProperty( + "Enum64Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum64Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance) == null); + enum64Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); + enum64Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); + enum64Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64Collection, 54), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[54]); + enum64Collection.SetPropertyIndexes( + index: 54, + originalValueIndex: 54, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum64Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var enum8 = runtimeEntityType.AddProperty( + "Enum8", + typeof(CompiledModelTestBase.Enum8), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8.SetGetter( + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); + enum8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); + enum8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); + enum8.SetAccessors( + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8, 55), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue(enum8), + object (ValueBuffer valueBuffer) => valueBuffer[55]); + enum8.SetPropertyIndexes( + index: 55, + originalValueIndex: 55, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); + enum8.SetSentinelFromProviderValue((sbyte)0); + + var enum8Array = runtimeEntityType.AddProperty( + "Enum8Array", + typeof(CompiledModelTestBase.Enum8[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8Array.SetGetter( + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance) == null); + enum8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); + enum8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); + enum8Array.SetAccessors( + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8Array, 56), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[56]); + enum8Array.SetPropertyIndexes( + index: 56, + originalValueIndex: 56, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + var enum8AsString = runtimeEntityType.AddProperty( + "Enum8AsString", + typeof(CompiledModelTestBase.Enum8), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enum8AsString.SetGetter( + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); + enum8AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); + enum8AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); + enum8AsString.SetAccessors( + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsString, 57), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[57]); + enum8AsString.SetPropertyIndexes( + index: 57, + originalValueIndex: 57, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enum8AsString.SetSentinelFromProviderValue("Default"); + + var enum8AsStringArray = runtimeEntityType.AddProperty( + "Enum8AsStringArray", + typeof(CompiledModelTestBase.Enum8[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8AsStringArray.SetGetter( + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance) == null); + enum8AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); + enum8AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); + enum8AsStringArray.SetAccessors( + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsStringArray, 58), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[58]); + enum8AsStringArray.SetPropertyIndexes( + index: 58, + originalValueIndex: 58, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum8AsStringCollection = runtimeEntityType.AddProperty( + "Enum8AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance) == null); + enum8AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); + enum8AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); + enum8AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8AsStringCollection, 59), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[59]); + enum8AsStringCollection.SetPropertyIndexes( + index: 59, + originalValueIndex: 59, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enum8Collection = runtimeEntityType.AddProperty( + "Enum8Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance) == null); + enum8Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); + enum8Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); + enum8Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8Collection, 60), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[60]); + enum8Collection.SetPropertyIndexes( + index: 60, + originalValueIndex: 60, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + 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.Enum8[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance) == null); + enum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); + enum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); + enum8NestedCollection.SetAccessors( + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8NestedCollection, 61), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.GetCurrentValue(enum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[61]); + enum8NestedCollection.SetPropertyIndexes( + index: 61, + originalValueIndex: 61, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[][] v1, CompiledModelTestBase.Enum8[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.Enum8[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[][] v1, CompiledModelTestBase.Enum8[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.Enum8[][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8[] v1, CompiledModelTestBase.Enum8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.Enum8[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); + + var enumToNumberConverterProperty = runtimeEntityType.AddProperty( + "EnumToNumberConverterProperty", + typeof(CompiledModelTestBase.Enum32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumToNumberConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new EnumToNumberConverter()); + enumToNumberConverterProperty.SetGetter( + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); + enumToNumberConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); + enumToNumberConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); + enumToNumberConverterProperty.SetAccessors( + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToNumberConverterProperty, 62), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue(enumToNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[62]); + enumToNumberConverterProperty.SetPropertyIndexes( + index: 62, + originalValueIndex: 62, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumToNumberConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); + enumToNumberConverterProperty.SetSentinelFromProviderValue(0); + + var enumToStringConverterProperty = runtimeEntityType.AddProperty( + "EnumToStringConverterProperty", + typeof(CompiledModelTestBase.Enum32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new EnumToStringConverter()); + enumToStringConverterProperty.SetGetter( + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); + enumToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); + enumToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); + enumToStringConverterProperty.SetAccessors( + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToStringConverterProperty, 63), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue(enumToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[63]); + enumToStringConverterProperty.SetPropertyIndexes( + index: 63, + originalValueIndex: 63, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enumToStringConverterProperty.SetSentinelFromProviderValue("Default"); + + var enumU16 = runtimeEntityType.AddProperty( + "EnumU16", + typeof(CompiledModelTestBase.EnumU16), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU16.SetGetter( + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); + enumU16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); + enumU16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); + enumU16.SetAccessors( + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16, 64), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16), + object (ValueBuffer valueBuffer) => valueBuffer[64]); + enumU16.SetPropertyIndexes( + index: 64, + originalValueIndex: 64, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); + enumU16.SetSentinelFromProviderValue((ushort)0); + + var enumU16Array = runtimeEntityType.AddProperty( + "EnumU16Array", + typeof(CompiledModelTestBase.EnumU16[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU16Array.SetGetter( + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance) == null); + enumU16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); + enumU16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); + enumU16Array.SetAccessors( + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16Array, 65), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[65]); + enumU16Array.SetPropertyIndexes( + index: 65, + originalValueIndex: 65, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16[] v1, CompiledModelTestBase.EnumU16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.EnumU16[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16[] v1, CompiledModelTestBase.EnumU16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.EnumU16[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU16[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var enumU16AsString = runtimeEntityType.AddProperty( + "EnumU16AsString", + typeof(CompiledModelTestBase.EnumU16), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enumU16AsString.SetGetter( + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); + enumU16AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); + enumU16AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); + enumU16AsString.SetAccessors( + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsString, 66), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[66]); + enumU16AsString.SetPropertyIndexes( + index: 66, + originalValueIndex: 66, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enumU16AsString.SetSentinelFromProviderValue("Min"); + + var enumU16AsStringArray = runtimeEntityType.AddProperty( + "EnumU16AsStringArray", + typeof(CompiledModelTestBase.EnumU16[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU16AsStringArray.SetGetter( + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance) == null); + enumU16AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); + enumU16AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); + enumU16AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsStringArray, 67), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[67]); + enumU16AsStringArray.SetPropertyIndexes( + index: 67, + originalValueIndex: 67, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16[] v1, CompiledModelTestBase.EnumU16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.EnumU16[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16[] v1, CompiledModelTestBase.EnumU16[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.EnumU16[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU16[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU16AsStringCollection = runtimeEntityType.AddProperty( + "EnumU16AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU16AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance) == null); + enumU16AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); + enumU16AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); + enumU16AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16AsStringCollection, 68), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[68]); + enumU16AsStringCollection.SetPropertyIndexes( + index: 68, + originalValueIndex: 68, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU16Collection = runtimeEntityType.AddProperty( + "EnumU16Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU16Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance) == null); + enumU16Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); + enumU16Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); + enumU16Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16Collection, 69), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[69]); + enumU16Collection.SetPropertyIndexes( + index: 69, + originalValueIndex: 69, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU16Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var enumU32 = runtimeEntityType.AddProperty( + "EnumU32", + typeof(CompiledModelTestBase.EnumU32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU32.SetGetter( + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); + enumU32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); + enumU32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); + enumU32.SetAccessors( + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32, 70), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32), + object (ValueBuffer valueBuffer) => valueBuffer[70]); + enumU32.SetPropertyIndexes( + index: 70, + originalValueIndex: 70, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); + enumU32.SetSentinelFromProviderValue(0u); + + var enumU32Array = runtimeEntityType.AddProperty( + "EnumU32Array", + typeof(CompiledModelTestBase.EnumU32[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU32Array.SetGetter( + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance) == null); + enumU32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); + enumU32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); + enumU32Array.SetAccessors( + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32Array, 71), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[71]); + enumU32Array.SetPropertyIndexes( + index: 71, + originalValueIndex: 71, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32[] v1, CompiledModelTestBase.EnumU32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.EnumU32[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32[] v1, CompiledModelTestBase.EnumU32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.EnumU32[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU32[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var enumU32AsString = runtimeEntityType.AddProperty( + "EnumU32AsString", + typeof(CompiledModelTestBase.EnumU32), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enumU32AsString.SetGetter( + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); + enumU32AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); + enumU32AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); + enumU32AsString.SetAccessors( + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsString, 72), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[72]); + enumU32AsString.SetPropertyIndexes( + index: 72, + originalValueIndex: 72, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enumU32AsString.SetSentinelFromProviderValue("Min"); + + var enumU32AsStringArray = runtimeEntityType.AddProperty( + "EnumU32AsStringArray", + typeof(CompiledModelTestBase.EnumU32[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU32AsStringArray.SetGetter( + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance) == null); + enumU32AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); + enumU32AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); + enumU32AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsStringArray, 73), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[73]); + enumU32AsStringArray.SetPropertyIndexes( + index: 73, + originalValueIndex: 73, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32[] v1, CompiledModelTestBase.EnumU32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.EnumU32[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32[] v1, CompiledModelTestBase.EnumU32[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.EnumU32[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU32[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU32AsStringCollection = runtimeEntityType.AddProperty( + "EnumU32AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU32AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance) == null); + enumU32AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); + enumU32AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); + enumU32AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32AsStringCollection, 74), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[74]); + enumU32AsStringCollection.SetPropertyIndexes( + index: 74, + originalValueIndex: 74, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU32Collection = runtimeEntityType.AddProperty( + "EnumU32Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU32Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance) == null); + enumU32Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); + enumU32Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); + enumU32Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32Collection, 75), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[75]); + enumU32Collection.SetPropertyIndexes( + index: 75, + originalValueIndex: 75, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU32Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var enumU64 = runtimeEntityType.AddProperty( + "EnumU64", + typeof(CompiledModelTestBase.EnumU64), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64.SetGetter( + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); + enumU64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); + enumU64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); + enumU64.SetAccessors( + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64, 76), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64), + object (ValueBuffer valueBuffer) => valueBuffer[76]); + enumU64.SetPropertyIndexes( + index: 76, + originalValueIndex: 76, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); + enumU64.SetSentinelFromProviderValue(0ul); + + var enumU64Array = runtimeEntityType.AddProperty( + "EnumU64Array", + typeof(CompiledModelTestBase.EnumU64[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64Array.SetGetter( + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance) == null); + enumU64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); + enumU64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); + enumU64Array.SetAccessors( + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64Array, 77), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[77]); + enumU64Array.SetPropertyIndexes( + index: 77, + originalValueIndex: 77, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + var enumU64AsString = runtimeEntityType.AddProperty( + "EnumU64AsString", + typeof(CompiledModelTestBase.EnumU64), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enumU64AsString.SetGetter( + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); + enumU64AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); + enumU64AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); + enumU64AsString.SetAccessors( + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsString, 78), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[78]); + enumU64AsString.SetPropertyIndexes( + index: 78, + originalValueIndex: 78, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enumU64AsString.SetSentinelFromProviderValue("Min"); + + var enumU64AsStringArray = runtimeEntityType.AddProperty( + "EnumU64AsStringArray", + typeof(CompiledModelTestBase.EnumU64[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64AsStringArray.SetGetter( + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance) == null); + enumU64AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); + enumU64AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); + enumU64AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsStringArray, 79), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[79]); + enumU64AsStringArray.SetPropertyIndexes( + index: 79, + originalValueIndex: 79, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU64AsStringCollection = runtimeEntityType.AddProperty( + "EnumU64AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance) == null); + enumU64AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); + enumU64AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); + enumU64AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64AsStringCollection, 80), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[80]); + enumU64AsStringCollection.SetPropertyIndexes( + index: 80, + originalValueIndex: 80, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU64Collection = runtimeEntityType.AddProperty( + "EnumU64Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance) == null); + enumU64Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); + enumU64Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); + enumU64Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64Collection, 81), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[81]); + enumU64Collection.SetPropertyIndexes( + index: 81, + originalValueIndex: 81, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + 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.EnumU64[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance) == null); + enumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); + enumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); + enumU64NestedCollection.SetAccessors( + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64NestedCollection, 82), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[82]); + enumU64NestedCollection.SetPropertyIndexes( + index: 82, + originalValueIndex: 82, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[][] v1, CompiledModelTestBase.EnumU64[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.EnumU64[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[][] v1, CompiledModelTestBase.EnumU64[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.EnumU64[][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64[] v1, CompiledModelTestBase.EnumU64[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.EnumU64[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); + + var enumU8 = runtimeEntityType.AddProperty( + "EnumU8", + typeof(CompiledModelTestBase.EnumU8), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU8.SetGetter( + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); + enumU8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); + enumU8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); + enumU8.SetAccessors( + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8, 83), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8), + object (ValueBuffer valueBuffer) => valueBuffer[83]); + enumU8.SetPropertyIndexes( + index: 83, + originalValueIndex: 83, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); + enumU8.SetSentinelFromProviderValue((byte)0); + + var enumU8Array = runtimeEntityType.AddProperty( + "EnumU8Array", + typeof(CompiledModelTestBase.EnumU8[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU8Array.SetGetter( + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance) == null); + enumU8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); + enumU8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); + enumU8Array.SetAccessors( + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8Array, 84), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[84]); + enumU8Array.SetPropertyIndexes( + index: 84, + originalValueIndex: 84, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8[] v1, CompiledModelTestBase.EnumU8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.EnumU8[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8[] v1, CompiledModelTestBase.EnumU8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.EnumU8[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU8[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var enumU8AsString = runtimeEntityType.AddProperty( + "EnumU8AsString", + typeof(CompiledModelTestBase.EnumU8), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + providerPropertyType: typeof(string)); + enumU8AsString.SetGetter( + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); + enumU8AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); + enumU8AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); + enumU8AsString.SetAccessors( + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsString, 85), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[85]); + enumU8AsString.SetPropertyIndexes( + index: 85, + originalValueIndex: 85, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)))); + enumU8AsString.SetSentinelFromProviderValue("Min"); + + var enumU8AsStringArray = runtimeEntityType.AddProperty( + "EnumU8AsStringArray", + typeof(CompiledModelTestBase.EnumU8[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU8AsStringArray.SetGetter( + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance) == null); + enumU8AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); + enumU8AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); + enumU8AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsStringArray, 86), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[86]); + enumU8AsStringArray.SetPropertyIndexes( + index: 86, + originalValueIndex: 86, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8[] v1, CompiledModelTestBase.EnumU8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.EnumU8[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8[] v1, CompiledModelTestBase.EnumU8[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.EnumU8[] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU8[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU8AsStringCollection = runtimeEntityType.AddProperty( + "EnumU8AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU8AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance) == null); + enumU8AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); + enumU8AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); + enumU8AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8AsStringCollection, 87), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[87]); + enumU8AsStringCollection.SetPropertyIndexes( + index: 87, + originalValueIndex: 87, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter.ConvertToEnum(v))))); + + var enumU8Collection = runtimeEntityType.AddProperty( + "EnumU8Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU8Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance) == null); + enumU8Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); + enumU8Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); + enumU8Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8Collection, 88), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[88]); + enumU8Collection.SetPropertyIndexes( + index: 88, + originalValueIndex: 88, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU8Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var @float = runtimeEntityType.AddProperty( + "Float", + typeof(float), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Float", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0f); + @float.SetGetter( + float (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity).Equals(0F), + float (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance).Equals(0F)); + @float.SetSetter( + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); + @float.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); + @float.SetAccessors( + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => entry.ReadOriginalValue(@float, 89), + float (InternalEntityEntry entry) => entry.GetCurrentValue(@float), + object (ValueBuffer valueBuffer) => valueBuffer[89]); + @float.SetPropertyIndexes( + index: 89, + originalValueIndex: 89, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @float.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + keyComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + providerValueComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + clrType: typeof(float), + jsonValueReaderWriter: JsonFloatReaderWriter.Instance); + + var floatArray = runtimeEntityType.AddProperty( + "FloatArray", + typeof(float[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("FloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + floatArray.SetGetter( + float[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity) == null, + float[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance) == null); + floatArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); + floatArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); + floatArray.SetAccessors( + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => entry.ReadOriginalValue(floatArray, 90), + float[] (InternalEntityEntry entry) => entry.GetCurrentValue(floatArray), + object (ValueBuffer valueBuffer) => valueBuffer[90]); + floatArray.SetPropertyIndexes( + index: 90, + originalValueIndex: 90, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + floatArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), + keyComparer: new ValueComparer( + bool (float[] v1, float[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (float[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + float[] (float[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (float[] v1, float[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (float[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + float[] (float[] source) => source.ToArray()), + clrType: typeof(float[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonFloatReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + keyComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + providerValueComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + clrType: typeof(float), + jsonValueReaderWriter: JsonFloatReaderWriter.Instance)); + + var guid = runtimeEntityType.AddProperty( + "Guid", + typeof(Guid), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Guid", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + guid.SetGetter( + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + guid.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); + guid.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); + guid.SetAccessors( + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(guid, 91), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue(guid), + object (ValueBuffer valueBuffer) => valueBuffer[91]); + guid.SetPropertyIndexes( + index: 91, + originalValueIndex: 91, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guid.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + guid.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var guidArray = runtimeEntityType.AddProperty( + "GuidArray", + typeof(Guid[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + guidArray.SetGetter( + Guid[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity) == null, + Guid[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance) == null); + guidArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); + guidArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); + guidArray.SetAccessors( + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => entry.ReadOriginalValue(guidArray, 92), + Guid[] (InternalEntityEntry entry) => entry.GetCurrentValue(guidArray), + object (ValueBuffer valueBuffer) => valueBuffer[92]); + guidArray.SetPropertyIndexes( + index: 92, + originalValueIndex: 92, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), + keyComparer: new ValueComparer( + bool (Guid[] v1, Guid[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[] (Guid[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid[] v1, Guid[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[] (Guid[] source) => source.ToArray()), + clrType: typeof(Guid[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v))))); + + 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( + ICollection (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) == null, + ICollection (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance) == null); + guidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); + guidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); + guidNestedCollection.SetAccessors( + ICollection (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection (InternalEntityEntry entry) => entry.ReadOriginalValue>(guidNestedCollection, 93), + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(guidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[93]); + guidNestedCollection.SetPropertyIndexes( + index: 93, + originalValueIndex: 93, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, Guid[][]>(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), + keyComparer: new ValueComparer>( + bool (ICollection v1, ICollection v2) => object.Equals(v1, v2), + int (ICollection v) => ((object)v).GetHashCode(), + ICollection (ICollection v) => v), + providerValueComparer: new ValueComparer>( + bool (ICollection v1, ICollection v2) => object.Equals(v1, v2), + int (ICollection v) => ((object)v).GetHashCode(), + ICollection (ICollection v) => v), + clrType: typeof(ICollection), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, Guid[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), + keyComparer: new ValueComparer( + bool (Guid[][] v1, Guid[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[][] (Guid[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid[][] v1, Guid[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[][] (Guid[][] source) => source.ToArray()), + clrType: typeof(Guid[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), + keyComparer: new ValueComparer( + bool (Guid[] v1, Guid[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[] (Guid[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid[] v1, Guid[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid[] (Guid[] source) => source.ToArray()), + clrType: typeof(Guid[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v))))))); + + var guidToBytesConverterProperty = runtimeEntityType.AddProperty( + "GuidToBytesConverterProperty", + typeof(Guid), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new GuidToBytesConverter()); + guidToBytesConverterProperty.SetGetter( + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + guidToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); + guidToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); + guidToBytesConverterProperty.SetAccessors( + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToBytesConverterProperty, 94), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue(guidToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[94]); + guidToBytesConverterProperty.SetPropertyIndexes( + index: 94, + originalValueIndex: 94, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => Convert.ToBase64String(v.ToByteArray()), + Guid (string v) => new Guid(Convert.FromBase64String(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => Convert.ToBase64String(v.ToByteArray()), + Guid (string v) => new Guid(Convert.FromBase64String(v))))); + guidToBytesConverterProperty.SetSentinelFromProviderValue("AAAAAAAAAAAAAAAAAAAAAA=="); + + var guidToStringConverterProperty = runtimeEntityType.AddProperty( + "GuidToStringConverterProperty", + typeof(Guid), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new GuidToStringConverter()); + guidToStringConverterProperty.SetGetter( + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + guidToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); + guidToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); + guidToStringConverterProperty.SetAccessors( + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToStringConverterProperty, 95), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue(guidToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[95]); + guidToStringConverterProperty.SetPropertyIndexes( + index: 95, + originalValueIndex: 95, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + guidToStringConverterProperty.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var iPAddress = runtimeEntityType.AddProperty( + "IPAddress", + typeof(IPAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + iPAddress.SetGetter( + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance) == null); + iPAddress.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); + iPAddress.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); + iPAddress.SetAccessors( + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddress, 96), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[96]); + iPAddress.SetPropertyIndexes( + index: 96, + originalValueIndex: 96, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + iPAddress.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); + + var iPAddressArray = runtimeEntityType.AddProperty( + "IPAddressArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + iPAddressArray.SetGetter( + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance) == null); + iPAddressArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); + iPAddressArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); + iPAddressArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressArray, 97), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[97]); + iPAddressArray.SetPropertyIndexes( + index: 97, + originalValueIndex: 97, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + iPAddressArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var iPAddressToBytesConverterProperty = runtimeEntityType.AddProperty( + "IPAddressToBytesConverterProperty", + typeof(IPAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new IPAddressToBytesConverter()); + iPAddressToBytesConverterProperty.SetGetter( + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance) == null); + iPAddressToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); + iPAddressToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); + iPAddressToBytesConverterProperty.SetAccessors( + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToBytesConverterProperty, 98), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[98]); + iPAddressToBytesConverterProperty.SetPropertyIndexes( + index: 98, + originalValueIndex: 98, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + iPAddressToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => Convert.ToBase64String(v.GetAddressBytes()), + IPAddress (string v) => new IPAddress(Convert.FromBase64String(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => Convert.ToBase64String(v.GetAddressBytes()), + IPAddress (string v) => new IPAddress(Convert.FromBase64String(v))))); + + var iPAddressToStringConverterProperty = runtimeEntityType.AddProperty( + "IPAddressToStringConverterProperty", + typeof(IPAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new IPAddressToStringConverter()); + iPAddressToStringConverterProperty.SetGetter( + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance) == null); + iPAddressToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); + iPAddressToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); + iPAddressToStringConverterProperty.SetAccessors( + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToStringConverterProperty, 99), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[99]); + iPAddressToStringConverterProperty.SetPropertyIndexes( + index: 99, + originalValueIndex: 99, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + iPAddressToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); + + var int16 = runtimeEntityType.AddProperty( + "Int16", + typeof(short), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: (short)0); + int16.SetGetter( + short (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity) == 0, + short (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance) == 0); + int16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); + int16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); + int16.SetAccessors( + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => entry.ReadOriginalValue(int16, 100), + short (InternalEntityEntry entry) => entry.GetCurrentValue(int16), + object (ValueBuffer valueBuffer) => valueBuffer[100]); + int16.SetPropertyIndexes( + index: 100, + originalValueIndex: 100, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance); + + var int16Array = runtimeEntityType.AddProperty( + "Int16Array", + typeof(short[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int16Array.SetGetter( + short[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity) == null, + short[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance) == null); + int16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); + int16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); + int16Array.SetAccessors( + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => entry.ReadOriginalValue(int16Array, 101), + short[] (InternalEntityEntry entry) => entry.GetCurrentValue(int16Array), + object (ValueBuffer valueBuffer) => valueBuffer[101]); + int16Array.SetPropertyIndexes( + index: 101, + originalValueIndex: 101, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer( + bool (short[] v1, short[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (short[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + short[] (short[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (short[] v1, short[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (short[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + short[] (short[] source) => source.ToArray()), + clrType: typeof(short[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var int32 = runtimeEntityType.AddProperty( + "Int32", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0); + int32.SetGetter( + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance) == 0); + int32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); + int32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); + int32.SetAccessors( + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(int32, 102), + int (InternalEntityEntry entry) => entry.GetCurrentValue(int32), + object (ValueBuffer valueBuffer) => valueBuffer[102]); + int32.SetPropertyIndexes( + index: 102, + originalValueIndex: 102, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + + var int32Array = runtimeEntityType.AddProperty( + "Int32Array", + typeof(int[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int32Array.SetGetter( + int[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity) == null, + int[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance) == null); + int32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); + int32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); + int32Array.SetAccessors( + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => entry.ReadOriginalValue(int32Array, 103), + int[] (InternalEntityEntry entry) => entry.GetCurrentValue(int32Array), + object (ValueBuffer valueBuffer) => valueBuffer[103]); + int32Array.SetPropertyIndexes( + index: 103, + originalValueIndex: 103, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), + keyComparer: new ValueComparer( + bool (int[] v1, int[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[] (int[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int[] v1, int[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[] (int[] source) => source.ToArray()), + clrType: typeof(int[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance)); + + 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( + int[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) == null, + int[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance) == null); + int32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); + int32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); + int32NestedCollection.SetAccessors( + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(int32NestedCollection, 104), + int[][] (InternalEntityEntry entry) => entry.GetCurrentValue(int32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[104]); + int32NestedCollection.SetPropertyIndexes( + index: 104, + originalValueIndex: 104, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int32NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), + keyComparer: new ValueComparer( + bool (int[][] v1, int[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[][] (int[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int[][] v1, int[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[][] (int[][] source) => source.ToArray()), + clrType: typeof(int[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), + keyComparer: new ValueComparer( + bool (int[] v1, int[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[] (int[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int[] v1, int[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int[] (int[] source) => source.ToArray()), + clrType: typeof(int[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance))); + + var int64 = runtimeEntityType.AddProperty( + "Int64", + typeof(long), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0L); + int64.SetGetter( + long (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity) == 0L, + long (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance) == 0L); + int64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); + int64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); + int64.SetAccessors( + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue(int64, 105), + long (InternalEntityEntry entry) => entry.GetCurrentValue(int64), + object (ValueBuffer valueBuffer) => valueBuffer[105]); + int64.SetPropertyIndexes( + index: 105, + originalValueIndex: 105, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + + var int64Array = runtimeEntityType.AddProperty( + "Int64Array", + typeof(long[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int64Array.SetGetter( + long[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity) == null, + long[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance) == null); + int64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); + int64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); + int64Array.SetAccessors( + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => entry.ReadOriginalValue(int64Array, 106), + long[] (InternalEntityEntry entry) => entry.GetCurrentValue(int64Array), + object (ValueBuffer valueBuffer) => valueBuffer[106]); + int64Array.SetPropertyIndexes( + index: 106, + originalValueIndex: 106, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), + keyComparer: new ValueComparer( + bool (long[] v1, long[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long[] (long[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (long[] v1, long[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long[] (long[] source) => source.ToArray()), + clrType: typeof(long[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance)); + + 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( + IList[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) == null, + IList[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance) == null); + int64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); + int64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); + int64NestedCollection.SetAccessors( + IList[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList[] (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(int64NestedCollection, 107), + IList[] (InternalEntityEntry entry) => entry.GetCurrentValue[]>(int64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[107]); + int64NestedCollection.SetPropertyIndexes( + index: 107, + originalValueIndex: 107, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int64NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], IList>(new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), + keyComparer: new ValueComparer[]>( + bool (IList[] v1, IList[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IList[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IList[] (IList[] source) => source.ToArray()), + providerValueComparer: new ValueComparer[]>( + bool (IList[] v1, IList[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IList[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IList[] (IList[] source) => source.ToArray()), + clrType: typeof(IList[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], IList>( + new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), + keyComparer: new ValueComparer( + bool (long[] v1, long[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long[] (long[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (long[] v1, long[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long[] (long[] source) => source.ToArray()), + clrType: typeof(long[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance)))); + + var int8 = runtimeEntityType.AddProperty( + "Int8", + typeof(sbyte), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: (sbyte)0); + int8.SetGetter( + sbyte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity) == 0, + sbyte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance) == 0); + int8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); + int8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); + int8.SetAccessors( + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => entry.ReadOriginalValue(int8, 108), + sbyte (InternalEntityEntry entry) => entry.GetCurrentValue(int8), + object (ValueBuffer valueBuffer) => valueBuffer[108]); + int8.SetPropertyIndexes( + index: 108, + originalValueIndex: 108, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + keyComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + clrType: typeof(sbyte), + jsonValueReaderWriter: JsonSByteReaderWriter.Instance); + + var int8Array = runtimeEntityType.AddProperty( + "Int8Array", + typeof(sbyte[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int8Array.SetGetter( + sbyte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity) == null, + sbyte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance) == null); + int8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); + int8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); + int8Array.SetAccessors( + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(int8Array, 109), + sbyte[] (InternalEntityEntry entry) => entry.GetCurrentValue(int8Array), + object (ValueBuffer valueBuffer) => valueBuffer[109]); + int8Array.SetPropertyIndexes( + index: 109, + originalValueIndex: 109, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), + keyComparer: new ValueComparer( + bool (sbyte[] v1, sbyte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[] (sbyte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (sbyte[] v1, sbyte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[] (sbyte[] source) => source.ToArray()), + clrType: typeof(sbyte[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonSByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + keyComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + clrType: typeof(sbyte), + jsonValueReaderWriter: JsonSByteReaderWriter.Instance)); + + 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( + sbyte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) == null, + sbyte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance) == null); + int8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); + int8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); + int8NestedCollection.SetAccessors( + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue(int8NestedCollection, 110), + sbyte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue(int8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[110]); + int8NestedCollection.SetPropertyIndexes( + index: 110, + originalValueIndex: 110, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int8NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), + keyComparer: new ValueComparer( + bool (sbyte[][][] v1, sbyte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[][][] (sbyte[][][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (sbyte[][][] v1, sbyte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[][][] (sbyte[][][] source) => source.ToArray()), + clrType: typeof(sbyte[][][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonSByteReaderWriter.Instance))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), + keyComparer: new ValueComparer( + bool (sbyte[][] v1, sbyte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[][] (sbyte[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (sbyte[][] v1, sbyte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[][] (sbyte[][] source) => source.ToArray()), + clrType: typeof(sbyte[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonSByteReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), + keyComparer: new ValueComparer( + bool (sbyte[] v1, sbyte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[] (sbyte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (sbyte[] v1, sbyte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte[] (sbyte[] source) => source.ToArray()), + clrType: typeof(sbyte[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonSByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + keyComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + clrType: typeof(sbyte), + jsonValueReaderWriter: JsonSByteReaderWriter.Instance)))); + + var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( + "IntNumberToBytesConverterProperty", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IntNumberToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToBytesConverter()); + intNumberToBytesConverterProperty.SetGetter( + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance) == 0); + intNumberToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); + intNumberToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); + intNumberToBytesConverterProperty.SetAccessors( + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToBytesConverterProperty, 111), + int (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[111]); + intNumberToBytesConverterProperty.SetPropertyIndexes( + index: 111, + originalValueIndex: 111, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + intNumberToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (int v) => Convert.ToBase64String(NumberToBytesConverter.ReverseInt(BitConverter.GetBytes(v))), + int (string v) => (Convert.FromBase64String(v) == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter.ReverseInt((Convert.FromBase64String(v).Length == 0 ? new byte[4] : Convert.FromBase64String(v))), 0))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (int v) => Convert.ToBase64String(NumberToBytesConverter.ReverseInt(BitConverter.GetBytes(v))), + int (string v) => (Convert.FromBase64String(v) == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter.ReverseInt((Convert.FromBase64String(v).Length == 0 ? new byte[4] : Convert.FromBase64String(v))), 0))))); + intNumberToBytesConverterProperty.SetSentinelFromProviderValue("AAAAAA=="); + + var intNumberToStringConverterProperty = runtimeEntityType.AddProperty( + "IntNumberToStringConverterProperty", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IntNumberToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new NumberToStringConverter()); + intNumberToStringConverterProperty.SetGetter( + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance) == 0); + intNumberToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); + intNumberToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); + intNumberToStringConverterProperty.SetAccessors( + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToStringConverterProperty, 112), + int (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[112]); + intNumberToStringConverterProperty.SetPropertyIndexes( + index: 112, + originalValueIndex: 112, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + intNumberToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + intNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); + + var nullIntToNullStringConverterProperty = runtimeEntityType.AddProperty( + "NullIntToNullStringConverterProperty", + typeof(int?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullIntToNullStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true, + valueConverter: new CompiledModelTestBase.NullIntToNullStringConverter()); + nullIntToNullStringConverterProperty.SetGetter( + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance).HasValue)); + nullIntToNullStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); + nullIntToNullStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); + nullIntToNullStringConverterProperty.SetAccessors( + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullIntToNullStringConverterProperty, 113), + int? (InternalEntityEntry entry) => entry.GetCurrentValue(nullIntToNullStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[113]); + nullIntToNullStringConverterProperty.SetPropertyIndexes( + index: 113, + originalValueIndex: 113, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullIntToNullStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), + keyComparer: new ValueComparer( + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "" ? null : ((int? )(int.Parse(v)))), + convertsNulls: true), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "" ? null : ((int? )(int.Parse(v)))), + convertsNulls: true))); + + var nullableBool = runtimeEntityType.AddProperty( + "NullableBool", + typeof(bool?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBool", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableBool.SetGetter( + bool? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableBool(entity).HasValue), + bool? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableBool(instance).HasValue)); + nullableBool.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); + nullableBool.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); + nullableBool.SetAccessors( + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBool, 114), + bool? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBool), + object (ValueBuffer valueBuffer) => valueBuffer[114]); + nullableBool.SetPropertyIndexes( + index: 114, + originalValueIndex: 114, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBool.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + clrType: typeof(bool), + jsonValueReaderWriter: JsonBoolReaderWriter.Instance); + nullableBool.SetValueComparer(new NullableValueComparer(nullableBool.TypeMapping.Comparer)); + nullableBool.SetKeyValueComparer(new NullableValueComparer(nullableBool.TypeMapping.KeyComparer)); + + var nullableBoolArray = runtimeEntityType.AddProperty( + "NullableBoolArray", + typeof(bool?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableBoolArray.SetGetter( + bool? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) == null, + bool? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance) == null); + nullableBoolArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); + nullableBoolArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); + nullableBoolArray.SetAccessors( + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBoolArray, 115), + bool? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBoolArray), + object (ValueBuffer valueBuffer) => valueBuffer[115]); + nullableBoolArray.SetPropertyIndexes( + index: 115, + originalValueIndex: 115, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBoolArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), + keyComparer: new ValueComparer( + bool (bool? [] v1, bool? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool? [] (bool? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (bool? [] v1, bool? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (bool? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + bool? [] (bool? [] source) => source.ToArray()), + clrType: typeof(bool?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonBoolReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + keyComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + clrType: typeof(bool), + jsonValueReaderWriter: JsonBoolReaderWriter.Instance)); + + var nullableBytes = runtimeEntityType.AddProperty( + "NullableBytes", + typeof(byte[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableBytes.SetGetter( + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance) == null); + nullableBytes.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); + nullableBytes.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); + nullableBytes.SetAccessors( + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytes, 116), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytes), + object (ValueBuffer valueBuffer) => valueBuffer[116]); + nullableBytes.SetPropertyIndexes( + index: 116, + originalValueIndex: 116, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBytes.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); + + var nullableBytesArray = runtimeEntityType.AddProperty( + "NullableBytesArray", + typeof(byte[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableBytesArray.SetGetter( + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance) == null); + nullableBytesArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); + nullableBytesArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); + nullableBytesArray.SetAccessors( + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesArray, 117), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[117]); + nullableBytesArray.SetPropertyIndexes( + index: 117, + originalValueIndex: 117, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBytesArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), + keyComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + clrType: typeof(byte[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v))))); + + 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( + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance) == null); + nullableBytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); + nullableBytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); + nullableBytesNestedCollection.SetAccessors( + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesNestedCollection, 118), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[118]); + nullableBytesNestedCollection.SetPropertyIndexes( + index: 118, + originalValueIndex: 118, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBytesNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), + keyComparer: new ValueComparer( + bool (byte[][][] v1, byte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][][] (byte[][][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][][] v1, byte[][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][][] (byte[][][] source) => source.ToArray()), + clrType: typeof(byte[][][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), + keyComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte[][] v1, byte[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[][] (byte[][] source) => source.ToArray()), + clrType: typeof(byte[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))))); + + var nullableChar = runtimeEntityType.AddProperty( + "NullableChar", + typeof(char?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableChar", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableChar.SetGetter( + char? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableChar(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableChar(entity).HasValue), + char? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableChar(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableChar(instance).HasValue)); + nullableChar.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); + nullableChar.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); + nullableChar.SetAccessors( + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableChar, 119), + char? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableChar), + object (ValueBuffer valueBuffer) => valueBuffer[119]); + nullableChar.SetPropertyIndexes( + index: 119, + originalValueIndex: 119, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableChar.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + clrType: typeof(char), + jsonValueReaderWriter: JsonCharReaderWriter.Instance); + nullableChar.SetValueComparer(new NullableValueComparer(nullableChar.TypeMapping.Comparer)); + nullableChar.SetKeyValueComparer(new NullableValueComparer(nullableChar.TypeMapping.KeyComparer)); + + var nullableCharArray = runtimeEntityType.AddProperty( + "NullableCharArray", + typeof(char?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableCharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableCharArray.SetGetter( + char? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity) == null, + char? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance) == null); + nullableCharArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); + nullableCharArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); + nullableCharArray.SetAccessors( + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableCharArray, 120), + char? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableCharArray), + object (ValueBuffer valueBuffer) => valueBuffer[120]); + nullableCharArray.SetPropertyIndexes( + index: 120, + originalValueIndex: 120, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableCharArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), + keyComparer: new ValueComparer( + bool (char? [] v1, char? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char? [] (char? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (char? [] v1, char? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (char? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + char? [] (char? [] source) => source.ToArray()), + clrType: typeof(char?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonCharReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + keyComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + clrType: typeof(char), + jsonValueReaderWriter: JsonCharReaderWriter.Instance)); + + var nullableDateOnly = runtimeEntityType.AddProperty( + "NullableDateOnly", + typeof(DateOnly?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnly", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableDateOnly.SetGetter( + DateOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateOnly(entity).HasValue), + DateOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateOnly(instance).HasValue)); + nullableDateOnly.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); + nullableDateOnly.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); + nullableDateOnly.SetAccessors( + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDateOnly, 121), + DateOnly? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[121]); + nullableDateOnly.SetPropertyIndexes( + index: 121, + originalValueIndex: 121, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDateOnly.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + keyComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + providerValueComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + clrType: typeof(DateOnly), + jsonValueReaderWriter: JsonDateOnlyReaderWriter.Instance); + nullableDateOnly.SetValueComparer(new NullableValueComparer(nullableDateOnly.TypeMapping.Comparer)); + nullableDateOnly.SetKeyValueComparer(new NullableValueComparer(nullableDateOnly.TypeMapping.KeyComparer)); + + var nullableDateOnlyArray = runtimeEntityType.AddProperty( + "NullableDateOnlyArray", + typeof(DateOnly?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableDateOnlyArray.SetGetter( + DateOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) == null, + DateOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance) == null); + nullableDateOnlyArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); + nullableDateOnlyArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); + nullableDateOnlyArray.SetAccessors( + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDateOnlyArray, 122), + DateOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[122]); + nullableDateOnlyArray.SetPropertyIndexes( + index: 122, + originalValueIndex: 122, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDateOnlyArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), + keyComparer: new ValueComparer( + bool (DateOnly? [] v1, DateOnly? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateOnly? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateOnly? [] (DateOnly? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateOnly? [] v1, DateOnly? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateOnly? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateOnly? [] (DateOnly? [] source) => source.ToArray()), + clrType: typeof(DateOnly?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonDateOnlyReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + keyComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + providerValueComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + clrType: typeof(DateOnly), + jsonValueReaderWriter: JsonDateOnlyReaderWriter.Instance)); + + var nullableDateTime = runtimeEntityType.AddProperty( + "NullableDateTime", + typeof(DateTime?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTime", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableDateTime.SetGetter( + DateTime? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateTime(entity).HasValue), + DateTime? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateTime(instance).HasValue)); + nullableDateTime.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); + nullableDateTime.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); + nullableDateTime.SetAccessors( + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDateTime, 123), + DateTime? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDateTime), + object (ValueBuffer valueBuffer) => valueBuffer[123]); + nullableDateTime.SetPropertyIndexes( + index: 123, + originalValueIndex: 123, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDateTime.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance); + nullableDateTime.SetValueComparer(new NullableValueComparer(nullableDateTime.TypeMapping.Comparer)); + nullableDateTime.SetKeyValueComparer(new NullableValueComparer(nullableDateTime.TypeMapping.KeyComparer)); + + var nullableDateTimeArray = runtimeEntityType.AddProperty( + "NullableDateTimeArray", + typeof(DateTime?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableDateTimeArray.SetGetter( + DateTime? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) == null, + DateTime? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance) == null); + nullableDateTimeArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); + nullableDateTimeArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); + nullableDateTimeArray.SetAccessors( + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDateTimeArray, 124), + DateTime? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[124]); + nullableDateTimeArray.SetPropertyIndexes( + index: 124, + originalValueIndex: 124, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDateTimeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), + keyComparer: new ValueComparer( + bool (DateTime? [] v1, DateTime? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime? [] (DateTime? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime? [] v1, DateTime? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime? [] (DateTime? [] source) => source.ToArray()), + clrType: typeof(DateTime?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var nullableDecimal = runtimeEntityType.AddProperty( + "NullableDecimal", + typeof(decimal?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimal", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableDecimal.SetGetter( + decimal? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDecimal(entity).HasValue), + decimal? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDecimal(instance).HasValue)); + nullableDecimal.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); + nullableDecimal.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); + nullableDecimal.SetAccessors( + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDecimal, 125), + decimal? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDecimal), + object (ValueBuffer valueBuffer) => valueBuffer[125]); + nullableDecimal.SetPropertyIndexes( + index: 125, + originalValueIndex: 125, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDecimal.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + clrType: typeof(decimal), + jsonValueReaderWriter: JsonDecimalReaderWriter.Instance); + nullableDecimal.SetValueComparer(new NullableValueComparer(nullableDecimal.TypeMapping.Comparer)); + nullableDecimal.SetKeyValueComparer(new NullableValueComparer(nullableDecimal.TypeMapping.KeyComparer)); + + var nullableDecimalArray = runtimeEntityType.AddProperty( + "NullableDecimalArray", + typeof(decimal?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableDecimalArray.SetGetter( + decimal? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) == null, + decimal? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance) == null); + nullableDecimalArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); + nullableDecimalArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); + nullableDecimalArray.SetAccessors( + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDecimalArray, 126), + decimal? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDecimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[126]); + nullableDecimalArray.SetPropertyIndexes( + index: 126, + originalValueIndex: 126, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDecimalArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), + keyComparer: new ValueComparer( + bool (decimal? [] v1, decimal? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (decimal? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + decimal? [] (decimal? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (decimal? [] v1, decimal? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (decimal? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + decimal? [] (decimal? [] source) => source.ToArray()), + clrType: typeof(decimal?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonDecimalReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + keyComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + clrType: typeof(decimal), + jsonValueReaderWriter: JsonDecimalReaderWriter.Instance)); + + var nullableDouble = runtimeEntityType.AddProperty( + "NullableDouble", + typeof(double?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDouble", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableDouble.SetGetter( + double? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDouble(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDouble(entity).HasValue), + double? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDouble(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDouble(instance).HasValue)); + nullableDouble.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); + nullableDouble.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); + nullableDouble.SetAccessors( + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDouble, 127), + double? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDouble), + object (ValueBuffer valueBuffer) => valueBuffer[127]); + nullableDouble.SetPropertyIndexes( + index: 127, + originalValueIndex: 127, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDouble.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + clrType: typeof(double), + jsonValueReaderWriter: JsonDoubleReaderWriter.Instance); + nullableDouble.SetValueComparer(new NullableValueComparer(nullableDouble.TypeMapping.Comparer)); + nullableDouble.SetKeyValueComparer(new NullableValueComparer(nullableDouble.TypeMapping.KeyComparer)); + + var nullableDoubleArray = runtimeEntityType.AddProperty( + "NullableDoubleArray", + typeof(double?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableDoubleArray.SetGetter( + double? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) == null, + double? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance) == null); + nullableDoubleArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); + nullableDoubleArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); + nullableDoubleArray.SetAccessors( + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableDoubleArray, 128), + double? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableDoubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[128]); + nullableDoubleArray.SetPropertyIndexes( + index: 128, + originalValueIndex: 128, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableDoubleArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), + keyComparer: new ValueComparer( + bool (double? [] v1, double? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (double? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + double? [] (double? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (double? [] v1, double? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (double? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + double? [] (double? [] source) => source.ToArray()), + clrType: typeof(double?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonDoubleReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + keyComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + providerValueComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + clrType: typeof(double), + jsonValueReaderWriter: JsonDoubleReaderWriter.Instance)); + + var nullableEnum16 = runtimeEntityType.AddProperty( + "NullableEnum16", + typeof(CompiledModelTestBase.Enum16?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum16.SetGetter( + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16(instance).HasValue)); + nullableEnum16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); + nullableEnum16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); + nullableEnum16.SetAccessors( + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum16, 129), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum16), + object (ValueBuffer valueBuffer) => valueBuffer[129]); + nullableEnum16.SetPropertyIndexes( + index: 129, + originalValueIndex: 129, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); + nullableEnum16.SetValueComparer(new NullableValueComparer(nullableEnum16.TypeMapping.Comparer)); + nullableEnum16.SetKeyValueComparer(new NullableValueComparer(nullableEnum16.TypeMapping.KeyComparer)); + + var nullableEnum16Array = runtimeEntityType.AddProperty( + "NullableEnum16Array", + typeof(CompiledModelTestBase.Enum16?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum16Array.SetGetter( + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance) == null); + nullableEnum16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); + nullableEnum16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); + nullableEnum16Array.SetAccessors( + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum16Array, 130), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[130]); + nullableEnum16Array.SetPropertyIndexes( + index: 130, + originalValueIndex: 130, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16? [] v1, CompiledModelTestBase.Enum16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.Enum16? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16? [] v1, CompiledModelTestBase.Enum16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.Enum16? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum16?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var nullableEnum16AsString = runtimeEntityType.AddProperty( + "NullableEnum16AsString", + typeof(CompiledModelTestBase.Enum16?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum16AsString.SetGetter( + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(instance).HasValue)); + nullableEnum16AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); + nullableEnum16AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); + nullableEnum16AsString.SetAccessors( + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum16AsString, 131), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[131]); + nullableEnum16AsString.SetPropertyIndexes( + index: 131, + originalValueIndex: 131, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); + nullableEnum16AsString.SetValueComparer(new NullableValueComparer(nullableEnum16AsString.TypeMapping.Comparer)); + nullableEnum16AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnum16AsString.TypeMapping.KeyComparer)); + + var nullableEnum16AsStringArray = runtimeEntityType.AddProperty( + "NullableEnum16AsStringArray", + typeof(CompiledModelTestBase.Enum16?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum16AsStringArray.SetGetter( + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance) == null); + nullableEnum16AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); + nullableEnum16AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); + nullableEnum16AsStringArray.SetAccessors( + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum16AsStringArray, 132), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[132]); + nullableEnum16AsStringArray.SetPropertyIndexes( + index: 132, + originalValueIndex: 132, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16? [] v1, CompiledModelTestBase.Enum16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.Enum16? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16? [] v1, CompiledModelTestBase.Enum16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.Enum16? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum16?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var nullableEnum16AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnum16AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum16AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance) == null); + nullableEnum16AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); + nullableEnum16AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); + nullableEnum16AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16AsStringCollection, 133), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[133]); + nullableEnum16AsStringCollection.SetPropertyIndexes( + index: 133, + originalValueIndex: 133, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var nullableEnum16Collection = runtimeEntityType.AddProperty( + "NullableEnum16Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum16Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance) == null); + nullableEnum16Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); + nullableEnum16Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); + nullableEnum16Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16Collection, 134), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[134]); + nullableEnum16Collection.SetPropertyIndexes( + index: 134, + originalValueIndex: 134, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum16Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + converter: new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); + + var nullableEnum32 = runtimeEntityType.AddProperty( + "NullableEnum32", + typeof(CompiledModelTestBase.Enum32?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum32.SetGetter( + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32(instance).HasValue)); + nullableEnum32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); + nullableEnum32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); + nullableEnum32.SetAccessors( + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum32, 135), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum32), + object (ValueBuffer valueBuffer) => valueBuffer[135]); + nullableEnum32.SetPropertyIndexes( + index: 135, + originalValueIndex: 135, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); + nullableEnum32.SetValueComparer(new NullableValueComparer(nullableEnum32.TypeMapping.Comparer)); + nullableEnum32.SetKeyValueComparer(new NullableValueComparer(nullableEnum32.TypeMapping.KeyComparer)); + + var nullableEnum32Array = runtimeEntityType.AddProperty( + "NullableEnum32Array", + typeof(CompiledModelTestBase.Enum32?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32Array.SetGetter( + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance) == null); + nullableEnum32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); + nullableEnum32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); + nullableEnum32Array.SetAccessors( + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum32Array, 136), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[136]); + nullableEnum32Array.SetPropertyIndexes( + index: 136, + originalValueIndex: 136, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + var nullableEnum32AsString = runtimeEntityType.AddProperty( + "NullableEnum32AsString", + typeof(CompiledModelTestBase.Enum32?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum32AsString.SetGetter( + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(instance).HasValue)); + nullableEnum32AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); + nullableEnum32AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); + nullableEnum32AsString.SetAccessors( + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum32AsString, 137), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[137]); + nullableEnum32AsString.SetPropertyIndexes( + index: 137, + originalValueIndex: 137, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); + nullableEnum32AsString.SetValueComparer(new NullableValueComparer(nullableEnum32AsString.TypeMapping.Comparer)); + nullableEnum32AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnum32AsString.TypeMapping.KeyComparer)); + + var nullableEnum32AsStringArray = runtimeEntityType.AddProperty( + "NullableEnum32AsStringArray", + typeof(CompiledModelTestBase.Enum32?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32AsStringArray.SetGetter( + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance) == null); + nullableEnum32AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); + nullableEnum32AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); + nullableEnum32AsStringArray.SetAccessors( + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum32AsStringArray, 138), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[138]); + nullableEnum32AsStringArray.SetPropertyIndexes( + index: 138, + originalValueIndex: 138, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + var nullableEnum32AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnum32AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance) == null); + nullableEnum32AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); + nullableEnum32AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); + nullableEnum32AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32AsStringCollection, 139), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[139]); + nullableEnum32AsStringCollection.SetPropertyIndexes( + index: 139, + originalValueIndex: 139, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + var nullableEnum32Collection = runtimeEntityType.AddProperty( + "NullableEnum32Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance) == null); + nullableEnum32Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); + nullableEnum32Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); + nullableEnum32Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32Collection, 140), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[140]); + nullableEnum32Collection.SetPropertyIndexes( + index: 140, + originalValueIndex: 140, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); + + 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.Enum32? [][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) == null, + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance) == null); + nullableEnum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); + nullableEnum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); + nullableEnum32NestedCollection.SetAccessors( + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum32NestedCollection, 141), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[141]); + nullableEnum32NestedCollection.SetPropertyIndexes( + index: 141, + originalValueIndex: 141, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [][][] v1, CompiledModelTestBase.Enum32? [][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.Enum32? [][][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [][][] v1, CompiledModelTestBase.Enum32? [][][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [][][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.Enum32? [][][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32?[][][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [][] v1, CompiledModelTestBase.Enum32? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [][] (CompiledModelTestBase.Enum32? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [][] v1, CompiledModelTestBase.Enum32? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [][] (CompiledModelTestBase.Enum32? [][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32? [] v1, CompiledModelTestBase.Enum32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.Enum32? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum32?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); + + var nullableEnum64 = runtimeEntityType.AddProperty( + "NullableEnum64", + typeof(CompiledModelTestBase.Enum64?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum64.SetGetter( + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64(instance).HasValue)); + nullableEnum64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); + nullableEnum64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); + nullableEnum64.SetAccessors( + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum64, 142), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum64), + object (ValueBuffer valueBuffer) => valueBuffer[142]); + nullableEnum64.SetPropertyIndexes( + index: 142, + originalValueIndex: 142, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); + nullableEnum64.SetValueComparer(new NullableValueComparer(nullableEnum64.TypeMapping.Comparer)); + nullableEnum64.SetKeyValueComparer(new NullableValueComparer(nullableEnum64.TypeMapping.KeyComparer)); + + var nullableEnum64Array = runtimeEntityType.AddProperty( + "NullableEnum64Array", + typeof(CompiledModelTestBase.Enum64?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum64Array.SetGetter( + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance) == null); + nullableEnum64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); + nullableEnum64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); + nullableEnum64Array.SetAccessors( + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum64Array, 143), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[143]); + nullableEnum64Array.SetPropertyIndexes( + index: 143, + originalValueIndex: 143, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64? [] v1, CompiledModelTestBase.Enum64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.Enum64? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64? [] v1, CompiledModelTestBase.Enum64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.Enum64? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum64?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var nullableEnum64AsString = runtimeEntityType.AddProperty( + "NullableEnum64AsString", + typeof(CompiledModelTestBase.Enum64?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum64AsString.SetGetter( + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(instance).HasValue)); + nullableEnum64AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); + nullableEnum64AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); + nullableEnum64AsString.SetAccessors( + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum64AsString, 144), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[144]); + nullableEnum64AsString.SetPropertyIndexes( + index: 144, + originalValueIndex: 144, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); + nullableEnum64AsString.SetValueComparer(new NullableValueComparer(nullableEnum64AsString.TypeMapping.Comparer)); + nullableEnum64AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnum64AsString.TypeMapping.KeyComparer)); + + var nullableEnum64AsStringArray = runtimeEntityType.AddProperty( + "NullableEnum64AsStringArray", + typeof(CompiledModelTestBase.Enum64?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum64AsStringArray.SetGetter( + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance) == null); + nullableEnum64AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); + nullableEnum64AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); + nullableEnum64AsStringArray.SetAccessors( + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum64AsStringArray, 145), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[145]); + nullableEnum64AsStringArray.SetPropertyIndexes( + index: 145, + originalValueIndex: 145, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64? [] v1, CompiledModelTestBase.Enum64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.Enum64? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64? [] v1, CompiledModelTestBase.Enum64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.Enum64? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum64?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var nullableEnum64AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnum64AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum64AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance) == null); + nullableEnum64AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); + nullableEnum64AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); + nullableEnum64AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64AsStringCollection, 146), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[146]); + nullableEnum64AsStringCollection.SetPropertyIndexes( + index: 146, + originalValueIndex: 146, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var nullableEnum64Collection = runtimeEntityType.AddProperty( + "NullableEnum64Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum64Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance) == null); + nullableEnum64Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); + nullableEnum64Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); + nullableEnum64Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64Collection, 147), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[147]); + nullableEnum64Collection.SetPropertyIndexes( + index: 147, + originalValueIndex: 147, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum64Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( + new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); + + var nullableEnum8 = runtimeEntityType.AddProperty( + "NullableEnum8", + typeof(CompiledModelTestBase.Enum8?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum8.SetGetter( + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8(instance).HasValue)); + nullableEnum8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); + nullableEnum8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); + nullableEnum8.SetAccessors( + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum8, 148), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum8), + object (ValueBuffer valueBuffer) => valueBuffer[148]); + nullableEnum8.SetPropertyIndexes( + index: 148, + originalValueIndex: 148, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); + nullableEnum8.SetValueComparer(new NullableValueComparer(nullableEnum8.TypeMapping.Comparer)); + nullableEnum8.SetKeyValueComparer(new NullableValueComparer(nullableEnum8.TypeMapping.KeyComparer)); + + var nullableEnum8Array = runtimeEntityType.AddProperty( + "NullableEnum8Array", + typeof(CompiledModelTestBase.Enum8?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8Array.SetGetter( + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance) == null); + nullableEnum8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); + nullableEnum8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); + nullableEnum8Array.SetAccessors( + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum8Array, 149), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[149]); + nullableEnum8Array.SetPropertyIndexes( + index: 149, + originalValueIndex: 149, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + var nullableEnum8AsString = runtimeEntityType.AddProperty( + "NullableEnum8AsString", + typeof(CompiledModelTestBase.Enum8?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnum8AsString.SetGetter( + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(instance).HasValue)); + nullableEnum8AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); + nullableEnum8AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); + nullableEnum8AsString.SetAccessors( + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum8AsString, 150), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[150]); + nullableEnum8AsString.SetPropertyIndexes( + index: 150, + originalValueIndex: 150, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); + nullableEnum8AsString.SetValueComparer(new NullableValueComparer(nullableEnum8AsString.TypeMapping.Comparer)); + nullableEnum8AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnum8AsString.TypeMapping.KeyComparer)); + + var nullableEnum8AsStringArray = runtimeEntityType.AddProperty( + "NullableEnum8AsStringArray", + typeof(CompiledModelTestBase.Enum8?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8AsStringArray.SetGetter( + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance) == null); + nullableEnum8AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); + nullableEnum8AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); + nullableEnum8AsStringArray.SetAccessors( + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum8AsStringArray, 151), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[151]); + nullableEnum8AsStringArray.SetPropertyIndexes( + index: 151, + originalValueIndex: 151, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + var nullableEnum8AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnum8AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance) == null); + nullableEnum8AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); + nullableEnum8AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); + nullableEnum8AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8AsStringCollection, 152), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[152]); + nullableEnum8AsStringCollection.SetPropertyIndexes( + index: 152, + originalValueIndex: 152, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + var nullableEnum8Collection = runtimeEntityType.AddProperty( + "NullableEnum8Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance) == null); + nullableEnum8Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); + nullableEnum8Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); + nullableEnum8Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8Collection, 153), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[153]); + nullableEnum8Collection.SetPropertyIndexes( + index: 153, + originalValueIndex: 153, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); + + 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.Enum8? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance) == null); + nullableEnum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); + nullableEnum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); + nullableEnum8NestedCollection.SetAccessors( + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnum8NestedCollection, 154), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[154]); + nullableEnum8NestedCollection.SetPropertyIndexes( + index: 154, + originalValueIndex: 154, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [][] v1, CompiledModelTestBase.Enum8? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.Enum8? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [][] v1, CompiledModelTestBase.Enum8? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.Enum8? [][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8? [] v1, CompiledModelTestBase.Enum8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.Enum8? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.Enum8?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + converter: new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonSByteReaderWriter.Instance, + new ValueConverter( + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); + + var nullableEnumU16 = runtimeEntityType.AddProperty( + "NullableEnumU16", + typeof(CompiledModelTestBase.EnumU16?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU16.SetGetter( + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16(instance).HasValue)); + nullableEnumU16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); + nullableEnumU16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); + nullableEnumU16.SetAccessors( + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU16, 155), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU16), + object (ValueBuffer valueBuffer) => valueBuffer[155]); + nullableEnumU16.SetPropertyIndexes( + index: 155, + originalValueIndex: 155, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); + nullableEnumU16.SetValueComparer(new NullableValueComparer(nullableEnumU16.TypeMapping.Comparer)); + nullableEnumU16.SetKeyValueComparer(new NullableValueComparer(nullableEnumU16.TypeMapping.KeyComparer)); + + var nullableEnumU16Array = runtimeEntityType.AddProperty( + "NullableEnumU16Array", + typeof(CompiledModelTestBase.EnumU16?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU16Array.SetGetter( + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance) == null); + nullableEnumU16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); + nullableEnumU16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); + nullableEnumU16Array.SetAccessors( + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU16Array, 156), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[156]); + nullableEnumU16Array.SetPropertyIndexes( + index: 156, + originalValueIndex: 156, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16? [] v1, CompiledModelTestBase.EnumU16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.EnumU16? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16? [] v1, CompiledModelTestBase.EnumU16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.EnumU16? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU16?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var nullableEnumU16AsString = runtimeEntityType.AddProperty( + "NullableEnumU16AsString", + typeof(CompiledModelTestBase.EnumU16?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU16AsString.SetGetter( + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance).HasValue)); + nullableEnumU16AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); + nullableEnumU16AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); + nullableEnumU16AsString.SetAccessors( + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU16AsString, 157), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[157]); + nullableEnumU16AsString.SetPropertyIndexes( + index: 157, + originalValueIndex: 157, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); + nullableEnumU16AsString.SetValueComparer(new NullableValueComparer(nullableEnumU16AsString.TypeMapping.Comparer)); + nullableEnumU16AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnumU16AsString.TypeMapping.KeyComparer)); + + var nullableEnumU16AsStringArray = runtimeEntityType.AddProperty( + "NullableEnumU16AsStringArray", + typeof(CompiledModelTestBase.EnumU16?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU16AsStringArray.SetGetter( + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance) == null); + nullableEnumU16AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); + nullableEnumU16AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); + nullableEnumU16AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU16AsStringArray, 158), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[158]); + nullableEnumU16AsStringArray.SetPropertyIndexes( + index: 158, + originalValueIndex: 158, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16? [] v1, CompiledModelTestBase.EnumU16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.EnumU16? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16? [] v1, CompiledModelTestBase.EnumU16? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.EnumU16? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU16?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var nullableEnumU16AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnumU16AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU16AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance) == null); + nullableEnumU16AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); + nullableEnumU16AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); + nullableEnumU16AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16AsStringCollection, 159), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[159]); + nullableEnumU16AsStringCollection.SetPropertyIndexes( + index: 159, + originalValueIndex: 159, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var nullableEnumU16Collection = runtimeEntityType.AddProperty( + "NullableEnumU16Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU16Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance) == null); + nullableEnumU16Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); + nullableEnumU16Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); + nullableEnumU16Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16Collection, 160), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[160]); + nullableEnumU16Collection.SetPropertyIndexes( + index: 160, + originalValueIndex: 160, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU16Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( + new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + converter: new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt16ReaderWriter.Instance, + new ValueConverter( + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); + + var nullableEnumU32 = runtimeEntityType.AddProperty( + "NullableEnumU32", + typeof(CompiledModelTestBase.EnumU32?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU32.SetGetter( + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32(instance).HasValue)); + nullableEnumU32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); + nullableEnumU32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); + nullableEnumU32.SetAccessors( + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU32, 161), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU32), + object (ValueBuffer valueBuffer) => valueBuffer[161]); + nullableEnumU32.SetPropertyIndexes( + index: 161, + originalValueIndex: 161, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); + nullableEnumU32.SetValueComparer(new NullableValueComparer(nullableEnumU32.TypeMapping.Comparer)); + nullableEnumU32.SetKeyValueComparer(new NullableValueComparer(nullableEnumU32.TypeMapping.KeyComparer)); + + var nullableEnumU32Array = runtimeEntityType.AddProperty( + "NullableEnumU32Array", + typeof(CompiledModelTestBase.EnumU32?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU32Array.SetGetter( + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance) == null); + nullableEnumU32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); + nullableEnumU32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); + nullableEnumU32Array.SetAccessors( + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU32Array, 162), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[162]); + nullableEnumU32Array.SetPropertyIndexes( + index: 162, + originalValueIndex: 162, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32? [] v1, CompiledModelTestBase.EnumU32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.EnumU32? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32? [] v1, CompiledModelTestBase.EnumU32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.EnumU32? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU32?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var nullableEnumU32AsString = runtimeEntityType.AddProperty( + "NullableEnumU32AsString", + typeof(CompiledModelTestBase.EnumU32?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU32AsString.SetGetter( + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance).HasValue)); + nullableEnumU32AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); + nullableEnumU32AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); + nullableEnumU32AsString.SetAccessors( + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU32AsString, 163), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[163]); + nullableEnumU32AsString.SetPropertyIndexes( + index: 163, + originalValueIndex: 163, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); + nullableEnumU32AsString.SetValueComparer(new NullableValueComparer(nullableEnumU32AsString.TypeMapping.Comparer)); + nullableEnumU32AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnumU32AsString.TypeMapping.KeyComparer)); + + var nullableEnumU32AsStringArray = runtimeEntityType.AddProperty( + "NullableEnumU32AsStringArray", + typeof(CompiledModelTestBase.EnumU32?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU32AsStringArray.SetGetter( + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance) == null); + nullableEnumU32AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); + nullableEnumU32AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); + nullableEnumU32AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU32AsStringArray, 164), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[164]); + nullableEnumU32AsStringArray.SetPropertyIndexes( + index: 164, + originalValueIndex: 164, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32? [] v1, CompiledModelTestBase.EnumU32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.EnumU32? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32? [] v1, CompiledModelTestBase.EnumU32? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.EnumU32? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU32?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var nullableEnumU32AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnumU32AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU32AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance) == null); + nullableEnumU32AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); + nullableEnumU32AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); + nullableEnumU32AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32AsStringCollection, 165), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[165]); + nullableEnumU32AsStringCollection.SetPropertyIndexes( + index: 165, + originalValueIndex: 165, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var nullableEnumU32Collection = runtimeEntityType.AddProperty( + "NullableEnumU32Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU32Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance) == null); + nullableEnumU32Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); + nullableEnumU32Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); + nullableEnumU32Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32Collection, 166), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[166]); + nullableEnumU32Collection.SetPropertyIndexes( + index: 166, + originalValueIndex: 166, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU32Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( + new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); + + var nullableEnumU64 = runtimeEntityType.AddProperty( + "NullableEnumU64", + typeof(CompiledModelTestBase.EnumU64?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU64.SetGetter( + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64(instance).HasValue)); + nullableEnumU64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); + nullableEnumU64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); + nullableEnumU64.SetAccessors( + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU64, 167), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU64), + object (ValueBuffer valueBuffer) => valueBuffer[167]); + nullableEnumU64.SetPropertyIndexes( + index: 167, + originalValueIndex: 167, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); + nullableEnumU64.SetValueComparer(new NullableValueComparer(nullableEnumU64.TypeMapping.Comparer)); + nullableEnumU64.SetKeyValueComparer(new NullableValueComparer(nullableEnumU64.TypeMapping.KeyComparer)); + + var nullableEnumU64Array = runtimeEntityType.AddProperty( + "NullableEnumU64Array", + typeof(CompiledModelTestBase.EnumU64?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64Array.SetGetter( + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance) == null); + nullableEnumU64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); + nullableEnumU64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); + nullableEnumU64Array.SetAccessors( + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU64Array, 168), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[168]); + nullableEnumU64Array.SetPropertyIndexes( + index: 168, + originalValueIndex: 168, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + var nullableEnumU64AsString = runtimeEntityType.AddProperty( + "NullableEnumU64AsString", + typeof(CompiledModelTestBase.EnumU64?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU64AsString.SetGetter( + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance).HasValue)); + nullableEnumU64AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); + nullableEnumU64AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); + nullableEnumU64AsString.SetAccessors( + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU64AsString, 169), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[169]); + nullableEnumU64AsString.SetPropertyIndexes( + index: 169, + originalValueIndex: 169, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); + nullableEnumU64AsString.SetValueComparer(new NullableValueComparer(nullableEnumU64AsString.TypeMapping.Comparer)); + nullableEnumU64AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnumU64AsString.TypeMapping.KeyComparer)); + + var nullableEnumU64AsStringArray = runtimeEntityType.AddProperty( + "NullableEnumU64AsStringArray", + typeof(CompiledModelTestBase.EnumU64?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64AsStringArray.SetGetter( + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance) == null); + nullableEnumU64AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); + nullableEnumU64AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); + nullableEnumU64AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU64AsStringArray, 170), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[170]); + nullableEnumU64AsStringArray.SetPropertyIndexes( + index: 170, + originalValueIndex: 170, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + var nullableEnumU64AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnumU64AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance) == null); + nullableEnumU64AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); + nullableEnumU64AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); + nullableEnumU64AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64AsStringCollection, 171), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[171]); + nullableEnumU64AsStringCollection.SetPropertyIndexes( + index: 171, + originalValueIndex: 171, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + var nullableEnumU64Collection = runtimeEntityType.AddProperty( + "NullableEnumU64Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance) == null); + nullableEnumU64Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); + nullableEnumU64Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); + nullableEnumU64Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64Collection, 172), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[172]); + nullableEnumU64Collection.SetPropertyIndexes( + index: 172, + originalValueIndex: 172, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); + + 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.EnumU64? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance) == null); + nullableEnumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); + nullableEnumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); + nullableEnumU64NestedCollection.SetAccessors( + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU64NestedCollection, 173), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[173]); + nullableEnumU64NestedCollection.SetPropertyIndexes( + index: 173, + originalValueIndex: 173, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [][] v1, CompiledModelTestBase.EnumU64? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.EnumU64? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [][] v1, CompiledModelTestBase.EnumU64? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.EnumU64? [][] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64? [] v1, CompiledModelTestBase.EnumU64? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.EnumU64? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU64?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + converter: new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt64ReaderWriter.Instance, + new ValueConverter( + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); + + var nullableEnumU8 = runtimeEntityType.AddProperty( + "NullableEnumU8", + typeof(CompiledModelTestBase.EnumU8?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU8.SetGetter( + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8(instance).HasValue)); + nullableEnumU8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); + nullableEnumU8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); + nullableEnumU8.SetAccessors( + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU8, 174), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU8), + object (ValueBuffer valueBuffer) => valueBuffer[174]); + nullableEnumU8.SetPropertyIndexes( + index: 174, + originalValueIndex: 174, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); + nullableEnumU8.SetValueComparer(new NullableValueComparer(nullableEnumU8.TypeMapping.Comparer)); + nullableEnumU8.SetKeyValueComparer(new NullableValueComparer(nullableEnumU8.TypeMapping.KeyComparer)); + + var nullableEnumU8Array = runtimeEntityType.AddProperty( + "NullableEnumU8Array", + typeof(CompiledModelTestBase.EnumU8?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU8Array.SetGetter( + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance) == null); + nullableEnumU8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); + nullableEnumU8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); + nullableEnumU8Array.SetAccessors( + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU8Array, 175), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[175]); + nullableEnumU8Array.SetPropertyIndexes( + index: 175, + originalValueIndex: 175, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8? [] v1, CompiledModelTestBase.EnumU8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.EnumU8? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8? [] v1, CompiledModelTestBase.EnumU8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.EnumU8? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU8?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var nullableEnumU8AsString = runtimeEntityType.AddProperty( + "NullableEnumU8AsString", + typeof(CompiledModelTestBase.EnumU8?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableEnumU8AsString.SetGetter( + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance).HasValue)); + nullableEnumU8AsString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); + nullableEnumU8AsString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); + nullableEnumU8AsString.SetAccessors( + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU8AsString, 176), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[176]); + nullableEnumU8AsString.SetPropertyIndexes( + index: 176, + originalValueIndex: 176, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8AsString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); + nullableEnumU8AsString.SetValueComparer(new NullableValueComparer(nullableEnumU8AsString.TypeMapping.Comparer)); + nullableEnumU8AsString.SetKeyValueComparer(new NullableValueComparer(nullableEnumU8AsString.TypeMapping.KeyComparer)); + + var nullableEnumU8AsStringArray = runtimeEntityType.AddProperty( + "NullableEnumU8AsStringArray", + typeof(CompiledModelTestBase.EnumU8?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU8AsStringArray.SetGetter( + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance) == null); + nullableEnumU8AsStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); + nullableEnumU8AsStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); + nullableEnumU8AsStringArray.SetAccessors( + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableEnumU8AsStringArray, 177), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableEnumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[177]); + nullableEnumU8AsStringArray.SetPropertyIndexes( + index: 177, + originalValueIndex: 177, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8AsStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8? [] v1, CompiledModelTestBase.EnumU8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.EnumU8? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8? [] v1, CompiledModelTestBase.EnumU8? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.EnumU8? [] source) => source.ToArray()), + clrType: typeof(CompiledModelTestBase.EnumU8?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var nullableEnumU8AsStringCollection = runtimeEntityType.AddProperty( + "NullableEnumU8AsStringCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU8AsStringCollection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance) == null); + nullableEnumU8AsStringCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); + nullableEnumU8AsStringCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); + nullableEnumU8AsStringCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8AsStringCollection, 178), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[178]); + nullableEnumU8AsStringCollection.SetPropertyIndexes( + index: 178, + originalValueIndex: 178, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8AsStringCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var nullableEnumU8Collection = runtimeEntityType.AddProperty( + "NullableEnumU8Collection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU8Collection.SetGetter( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance) == null); + nullableEnumU8Collection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); + nullableEnumU8Collection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); + nullableEnumU8Collection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8Collection, 179), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[179]); + nullableEnumU8Collection.SetPropertyIndexes( + index: 179, + originalValueIndex: 179, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU8Collection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new NullableValueComparer(new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( + new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + converter: new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonByteReaderWriter.Instance, + new ValueConverter( + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); + + var nullableFloat = runtimeEntityType.AddProperty( + "NullableFloat", + typeof(float?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloat", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableFloat.SetGetter( + float? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloat(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableFloat(entity).HasValue), + float? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloat(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableFloat(instance).HasValue)); + nullableFloat.SetSetter( + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); + nullableFloat.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); + nullableFloat.SetAccessors( + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableFloat, 180), + float? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableFloat), + object (ValueBuffer valueBuffer) => valueBuffer[180]); + nullableFloat.SetPropertyIndexes( + index: 180, + originalValueIndex: 180, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableFloat.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + keyComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + providerValueComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + clrType: typeof(float), + jsonValueReaderWriter: JsonFloatReaderWriter.Instance); + nullableFloat.SetValueComparer(new NullableValueComparer(nullableFloat.TypeMapping.Comparer)); + nullableFloat.SetKeyValueComparer(new NullableValueComparer(nullableFloat.TypeMapping.KeyComparer)); + + var nullableFloatArray = runtimeEntityType.AddProperty( + "NullableFloatArray", + typeof(float?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableFloatArray.SetGetter( + float? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) == null, + float? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance) == null); + nullableFloatArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); + nullableFloatArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); + nullableFloatArray.SetAccessors( + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableFloatArray, 181), + float? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableFloatArray), + object (ValueBuffer valueBuffer) => valueBuffer[181]); + nullableFloatArray.SetPropertyIndexes( + index: 181, + originalValueIndex: 181, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableFloatArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), + keyComparer: new ValueComparer( + bool (float? [] v1, float? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (float? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + float? [] (float? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (float? [] v1, float? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (float? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + float? [] (float? [] source) => source.ToArray()), + clrType: typeof(float?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonFloatReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + keyComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + providerValueComparer: new ValueComparer( + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), + clrType: typeof(float), + jsonValueReaderWriter: JsonFloatReaderWriter.Instance)); + + var nullableGuid = runtimeEntityType.AddProperty( + "NullableGuid", + typeof(Guid?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuid", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableGuid.SetGetter( + Guid? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableGuid(entity).HasValue), + Guid? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableGuid(instance).HasValue)); + nullableGuid.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); + nullableGuid.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); + nullableGuid.SetAccessors( + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableGuid, 182), + Guid? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableGuid), + object (ValueBuffer valueBuffer) => valueBuffer[182]); + nullableGuid.SetPropertyIndexes( + index: 182, + originalValueIndex: 182, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableGuid.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + nullableGuid.SetValueComparer(new NullableValueComparer(nullableGuid.TypeMapping.Comparer)); + nullableGuid.SetKeyValueComparer(new NullableValueComparer(nullableGuid.TypeMapping.KeyComparer)); + + var nullableGuidArray = runtimeEntityType.AddProperty( + "NullableGuidArray", + typeof(Guid?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableGuidArray.SetGetter( + Guid? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) == null, + Guid? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance) == null); + nullableGuidArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); + nullableGuidArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); + nullableGuidArray.SetAccessors( + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableGuidArray, 183), + Guid? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableGuidArray), + object (ValueBuffer valueBuffer) => valueBuffer[183]); + nullableGuidArray.SetPropertyIndexes( + index: 183, + originalValueIndex: 183, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableGuidArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), + keyComparer: new ValueComparer( + bool (Guid? [] v1, Guid? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [] (Guid? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid? [] v1, Guid? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [] (Guid? [] source) => source.ToArray()), + clrType: typeof(Guid?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v))))); + + 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( + Guid? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) == null, + Guid? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance) == null); + nullableGuidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); + nullableGuidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); + nullableGuidNestedCollection.SetAccessors( + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableGuidNestedCollection, 184), + Guid? [][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableGuidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[184]); + nullableGuidNestedCollection.SetPropertyIndexes( + index: 184, + originalValueIndex: 184, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableGuidNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), + keyComparer: new ValueComparer( + bool (Guid? [][] v1, Guid? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [][] (Guid? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid? [][] v1, Guid? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [][] (Guid? [][] source) => source.ToArray()), + clrType: typeof(Guid?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), + keyComparer: new ValueComparer( + bool (Guid? [] v1, Guid? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [] (Guid? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Guid? [] v1, Guid? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Guid? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Guid? [] (Guid? [] source) => source.ToArray()), + clrType: typeof(Guid?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))))); + + var nullableIPAddress = runtimeEntityType.AddProperty( + "NullableIPAddress", + typeof(IPAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableIPAddress.SetGetter( + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance) == null); + nullableIPAddress.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); + nullableIPAddress.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); + nullableIPAddress.SetAccessors( + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddress, 185), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[185]); + nullableIPAddress.SetPropertyIndexes( + index: 185, + originalValueIndex: 185, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableIPAddress.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); + + var nullableIPAddressArray = runtimeEntityType.AddProperty( + "NullableIPAddressArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableIPAddressArray.SetGetter( + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance) == null); + nullableIPAddressArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); + nullableIPAddressArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); + nullableIPAddressArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddressArray, 186), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[186]); + nullableIPAddressArray.SetPropertyIndexes( + index: 186, + originalValueIndex: 186, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableIPAddressArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var nullableInt16 = runtimeEntityType.AddProperty( + "NullableInt16", + typeof(short?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableInt16.SetGetter( + short? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt16(entity).HasValue), + short? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt16(instance).HasValue)); + nullableInt16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); + nullableInt16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); + nullableInt16.SetAccessors( + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt16, 187), + short? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt16), + object (ValueBuffer valueBuffer) => valueBuffer[187]); + nullableInt16.SetPropertyIndexes( + index: 187, + originalValueIndex: 187, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance); + nullableInt16.SetValueComparer(new NullableValueComparer(nullableInt16.TypeMapping.Comparer)); + nullableInt16.SetKeyValueComparer(new NullableValueComparer(nullableInt16.TypeMapping.KeyComparer)); + + var nullableInt16Array = runtimeEntityType.AddProperty( + "NullableInt16Array", + typeof(short?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt16Array.SetGetter( + short? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) == null, + short? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance) == null); + nullableInt16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); + nullableInt16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); + nullableInt16Array.SetAccessors( + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt16Array, 188), + short? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[188]); + nullableInt16Array.SetPropertyIndexes( + index: 188, + originalValueIndex: 188, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), + keyComparer: new ValueComparer( + bool (short? [] v1, short? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (short? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + short? [] (short? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (short? [] v1, short? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (short? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + short? [] (short? [] source) => source.ToArray()), + clrType: typeof(short?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var nullableInt32 = runtimeEntityType.AddProperty( + "NullableInt32", + typeof(int?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableInt32.SetGetter( + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt32(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt32(instance).HasValue)); + nullableInt32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); + nullableInt32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); + nullableInt32.SetAccessors( + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt32, 189), + int? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt32), + object (ValueBuffer valueBuffer) => valueBuffer[189]); + nullableInt32.SetPropertyIndexes( + index: 189, + originalValueIndex: 189, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + nullableInt32.SetValueComparer(new NullableValueComparer(nullableInt32.TypeMapping.Comparer)); + nullableInt32.SetKeyValueComparer(new NullableValueComparer(nullableInt32.TypeMapping.KeyComparer)); + + var nullableInt32Array = runtimeEntityType.AddProperty( + "NullableInt32Array", + typeof(int?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt32Array.SetGetter( + int? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) == null, + int? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance) == null); + nullableInt32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); + nullableInt32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); + nullableInt32Array.SetAccessors( + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt32Array, 190), + int? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[190]); + nullableInt32Array.SetPropertyIndexes( + index: 190, + originalValueIndex: 190, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), + keyComparer: new ValueComparer( + bool (int? [] v1, int? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [] (int? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int? [] v1, int? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [] (int? [] source) => source.ToArray()), + clrType: typeof(int?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance)); + + 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( + int? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) == null, + int? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance) == null); + nullableInt32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); + nullableInt32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); + nullableInt32NestedCollection.SetAccessors( + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt32NestedCollection, 191), + int? [][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[191]); + nullableInt32NestedCollection.SetPropertyIndexes( + index: 191, + originalValueIndex: 191, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt32NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), + keyComparer: new ValueComparer( + bool (int? [][] v1, int? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [][] (int? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int? [][] v1, int? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [][] (int? [][] source) => source.ToArray()), + clrType: typeof(int?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), + keyComparer: new ValueComparer( + bool (int? [] v1, int? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [] (int? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (int? [] v1, int? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (int? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + int? [] (int? [] source) => source.ToArray()), + clrType: typeof(int?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance))); + + var nullableInt64 = runtimeEntityType.AddProperty( + "NullableInt64", + typeof(long?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableInt64.SetGetter( + long? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt64(entity).HasValue), + long? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt64(instance).HasValue)); + nullableInt64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); + nullableInt64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); + nullableInt64.SetAccessors( + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt64, 192), + long? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt64), + object (ValueBuffer valueBuffer) => valueBuffer[192]); + nullableInt64.SetPropertyIndexes( + index: 192, + originalValueIndex: 192, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + nullableInt64.SetValueComparer(new NullableValueComparer(nullableInt64.TypeMapping.Comparer)); + nullableInt64.SetKeyValueComparer(new NullableValueComparer(nullableInt64.TypeMapping.KeyComparer)); + + var nullableInt64Array = runtimeEntityType.AddProperty( + "NullableInt64Array", + typeof(long?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt64Array.SetGetter( + long? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) == null, + long? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance) == null); + nullableInt64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); + nullableInt64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); + nullableInt64Array.SetAccessors( + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt64Array, 193), + long? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[193]); + nullableInt64Array.SetPropertyIndexes( + index: 193, + originalValueIndex: 193, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), + keyComparer: new ValueComparer( + bool (long? [] v1, long? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [] (long? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (long? [] v1, long? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [] (long? [] source) => source.ToArray()), + clrType: typeof(long?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance)); + + 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( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance) == null); + nullableInt64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); + nullableInt64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); + nullableInt64NestedCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt64NestedCollection, 194), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[194]); + nullableInt64NestedCollection.SetPropertyIndexes( + index: 194, + originalValueIndex: 194, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt64NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long?[][]>(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long?[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), + keyComparer: new ValueComparer( + bool (long? [][] v1, long? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [][] (long? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (long? [][] v1, long? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [][] (long? [][] source) => source.ToArray()), + clrType: typeof(long?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), + keyComparer: new ValueComparer( + bool (long? [] v1, long? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [] (long? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (long? [] v1, long? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (long? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + long? [] (long? [] source) => source.ToArray()), + clrType: typeof(long?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance)))); + + var nullableInt8 = runtimeEntityType.AddProperty( + "NullableInt8", + typeof(sbyte?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableInt8.SetGetter( + sbyte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt8(entity).HasValue), + sbyte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt8(instance).HasValue)); + nullableInt8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); + nullableInt8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); + nullableInt8.SetAccessors( + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt8, 195), + sbyte? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt8), + object (ValueBuffer valueBuffer) => valueBuffer[195]); + nullableInt8.SetPropertyIndexes( + index: 195, + originalValueIndex: 195, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + keyComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + clrType: typeof(sbyte), + jsonValueReaderWriter: JsonSByteReaderWriter.Instance); + nullableInt8.SetValueComparer(new NullableValueComparer(nullableInt8.TypeMapping.Comparer)); + nullableInt8.SetKeyValueComparer(new NullableValueComparer(nullableInt8.TypeMapping.KeyComparer)); + + var nullableInt8Array = runtimeEntityType.AddProperty( + "NullableInt8Array", + typeof(sbyte?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt8Array.SetGetter( + sbyte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) == null, + sbyte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance) == null); + nullableInt8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); + nullableInt8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); + nullableInt8Array.SetAccessors( + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableInt8Array, 196), + sbyte? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[196]); + nullableInt8Array.SetPropertyIndexes( + index: 196, + originalValueIndex: 196, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), + keyComparer: new ValueComparer( + bool (sbyte? [] v1, sbyte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte? [] (sbyte? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (sbyte? [] v1, sbyte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (sbyte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + sbyte? [] (sbyte? [] source) => source.ToArray()), + clrType: typeof(sbyte?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonSByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + keyComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + providerValueComparer: new ValueComparer( + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), + clrType: typeof(sbyte), + jsonValueReaderWriter: JsonSByteReaderWriter.Instance)); + + var nullablePhysicalAddress = runtimeEntityType.AddProperty( + "NullablePhysicalAddress", + typeof(PhysicalAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullablePhysicalAddress.SetGetter( + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance) == null); + nullablePhysicalAddress.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); + nullablePhysicalAddress.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); + nullablePhysicalAddress.SetAccessors( + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddress, 197), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[197]); + nullablePhysicalAddress.SetPropertyIndexes( + index: 197, + originalValueIndex: 197, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullablePhysicalAddress.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); + + var nullablePhysicalAddressArray = runtimeEntityType.AddProperty( + "NullablePhysicalAddressArray", + typeof(PhysicalAddress[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullablePhysicalAddressArray.SetGetter( + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance) == null); + nullablePhysicalAddressArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); + nullablePhysicalAddressArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); + nullablePhysicalAddressArray.SetAccessors( + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddressArray, 198), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[198]); + nullablePhysicalAddressArray.SetPropertyIndexes( + index: 198, + originalValueIndex: 198, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullablePhysicalAddressArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), + keyComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + clrType: typeof(PhysicalAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); + + 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( + IEnumerable (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) == null, + IEnumerable (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance) == null); + nullablePhysicalAddressNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); + nullablePhysicalAddressNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); + nullablePhysicalAddressNestedCollection.SetAccessors( + IEnumerable (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullablePhysicalAddressNestedCollection, 199), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(nullablePhysicalAddressNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[199]); + nullablePhysicalAddressNestedCollection.SetPropertyIndexes( + index: 199, + originalValueIndex: 199, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullablePhysicalAddressNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, PhysicalAddress[][]>(new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, PhysicalAddress[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), + keyComparer: new ValueComparer( + bool (PhysicalAddress[][] v1, PhysicalAddress[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[][] (PhysicalAddress[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (PhysicalAddress[][] v1, PhysicalAddress[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[][] (PhysicalAddress[][] source) => source.ToArray()), + clrType: typeof(PhysicalAddress[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), + keyComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + clrType: typeof(PhysicalAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))); + + var nullableString = runtimeEntityType.AddProperty( + "NullableString", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableString", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableString.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance) == null); + nullableString.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); + nullableString.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); + nullableString.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableString, 200), + string (InternalEntityEntry entry) => entry.GetCurrentValue(nullableString), + object (ValueBuffer valueBuffer) => valueBuffer[200]); + nullableString.SetPropertyIndexes( + index: 200, + originalValueIndex: 200, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableString.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var nullableStringArray = runtimeEntityType.AddProperty( + "NullableStringArray", + typeof(string[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableStringArray.SetGetter( + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance) == null); + nullableStringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); + nullableStringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); + nullableStringArray.SetAccessors( + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringArray, 201), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[201]); + nullableStringArray.SetPropertyIndexes( + index: 201, + originalValueIndex: 201, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableStringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + clrType: typeof(string[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + 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( + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance) == null); + nullableStringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); + nullableStringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); + nullableStringNestedCollection.SetAccessors( + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringNestedCollection, 202), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[202]); + nullableStringNestedCollection.SetPropertyIndexes( + index: 202, + originalValueIndex: 202, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableStringNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), + keyComparer: new ValueComparer( + bool (string[][] v1, string[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[][] (string[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[][] v1, string[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[][] (string[][] source) => source.ToArray()), + clrType: typeof(string[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + clrType: typeof(string[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance))); + + var nullableTimeOnly = runtimeEntityType.AddProperty( + "NullableTimeOnly", + typeof(TimeOnly?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnly", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableTimeOnly.SetGetter( + TimeOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(entity).HasValue), + TimeOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(instance).HasValue)); + nullableTimeOnly.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); + nullableTimeOnly.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); + nullableTimeOnly.SetAccessors( + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableTimeOnly, 203), + TimeOnly? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableTimeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[203]); + nullableTimeOnly.SetPropertyIndexes( + index: 203, + originalValueIndex: 203, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableTimeOnly.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + clrType: typeof(TimeOnly), + jsonValueReaderWriter: JsonTimeOnlyReaderWriter.Instance); + nullableTimeOnly.SetValueComparer(new NullableValueComparer(nullableTimeOnly.TypeMapping.Comparer)); + nullableTimeOnly.SetKeyValueComparer(new NullableValueComparer(nullableTimeOnly.TypeMapping.KeyComparer)); + + var nullableTimeOnlyArray = runtimeEntityType.AddProperty( + "NullableTimeOnlyArray", + typeof(TimeOnly?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableTimeOnlyArray.SetGetter( + TimeOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) == null, + TimeOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance) == null); + nullableTimeOnlyArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); + nullableTimeOnlyArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); + nullableTimeOnlyArray.SetAccessors( + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableTimeOnlyArray, 204), + TimeOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableTimeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[204]); + nullableTimeOnlyArray.SetPropertyIndexes( + index: 204, + originalValueIndex: 204, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableTimeOnlyArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), + keyComparer: new ValueComparer( + bool (TimeOnly? [] v1, TimeOnly? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeOnly? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeOnly? [] (TimeOnly? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (TimeOnly? [] v1, TimeOnly? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeOnly? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeOnly? [] (TimeOnly? [] source) => source.ToArray()), + clrType: typeof(TimeOnly?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonTimeOnlyReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + clrType: typeof(TimeOnly), + jsonValueReaderWriter: JsonTimeOnlyReaderWriter.Instance)); + + var nullableTimeSpan = runtimeEntityType.AddProperty( + "NullableTimeSpan", + typeof(TimeSpan?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpan", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableTimeSpan.SetGetter( + TimeSpan? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(entity).HasValue), + TimeSpan? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(instance).HasValue)); + nullableTimeSpan.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); + nullableTimeSpan.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); + nullableTimeSpan.SetAccessors( + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableTimeSpan, 205), + TimeSpan? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableTimeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[205]); + nullableTimeSpan.SetPropertyIndexes( + index: 205, + originalValueIndex: 205, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableTimeSpan.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + clrType: typeof(TimeSpan), + jsonValueReaderWriter: JsonTimeSpanReaderWriter.Instance); + nullableTimeSpan.SetValueComparer(new NullableValueComparer(nullableTimeSpan.TypeMapping.Comparer)); + nullableTimeSpan.SetKeyValueComparer(new NullableValueComparer(nullableTimeSpan.TypeMapping.KeyComparer)); + + var nullableTimeSpanArray = runtimeEntityType.AddProperty( + "NullableTimeSpanArray", + typeof(TimeSpan?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableTimeSpanArray.SetGetter( + TimeSpan? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) == null, + TimeSpan? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance) == null); + nullableTimeSpanArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); + nullableTimeSpanArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); + nullableTimeSpanArray.SetAccessors( + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableTimeSpanArray, 206), + TimeSpan? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableTimeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[206]); + nullableTimeSpanArray.SetPropertyIndexes( + index: 206, + originalValueIndex: 206, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableTimeSpanArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), + keyComparer: new ValueComparer( + bool (TimeSpan? [] v1, TimeSpan? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeSpan? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeSpan? [] (TimeSpan? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (TimeSpan? [] v1, TimeSpan? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeSpan? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeSpan? [] (TimeSpan? [] source) => source.ToArray()), + clrType: typeof(TimeSpan?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonTimeSpanReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + clrType: typeof(TimeSpan), + jsonValueReaderWriter: JsonTimeSpanReaderWriter.Instance)); + + var nullableUInt16 = runtimeEntityType.AddProperty( + "NullableUInt16", + typeof(ushort?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableUInt16.SetGetter( + ushort? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt16(entity).HasValue), + ushort? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt16(instance).HasValue)); + nullableUInt16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); + nullableUInt16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); + nullableUInt16.SetAccessors( + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt16, 207), + ushort? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt16), + object (ValueBuffer valueBuffer) => valueBuffer[207]); + nullableUInt16.SetPropertyIndexes( + index: 207, + originalValueIndex: 207, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + keyComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + clrType: typeof(ushort), + jsonValueReaderWriter: JsonUInt16ReaderWriter.Instance); + nullableUInt16.SetValueComparer(new NullableValueComparer(nullableUInt16.TypeMapping.Comparer)); + nullableUInt16.SetKeyValueComparer(new NullableValueComparer(nullableUInt16.TypeMapping.KeyComparer)); + + var nullableUInt16Array = runtimeEntityType.AddProperty( + "NullableUInt16Array", + typeof(ushort?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt16Array.SetGetter( + ushort? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) == null, + ushort? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance) == null); + nullableUInt16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); + nullableUInt16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); + nullableUInt16Array.SetAccessors( + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt16Array, 208), + ushort? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[208]); + nullableUInt16Array.SetPropertyIndexes( + index: 208, + originalValueIndex: 208, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), + keyComparer: new ValueComparer( + bool (ushort? [] v1, ushort? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ushort? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ushort? [] (ushort? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (ushort? [] v1, ushort? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ushort? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ushort? [] (ushort? [] source) => source.ToArray()), + clrType: typeof(ushort?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonUInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + keyComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + clrType: typeof(ushort), + jsonValueReaderWriter: JsonUInt16ReaderWriter.Instance)); + + var nullableUInt32 = runtimeEntityType.AddProperty( + "NullableUInt32", + typeof(uint?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableUInt32.SetGetter( + uint? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt32(entity).HasValue), + uint? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt32(instance).HasValue)); + nullableUInt32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); + nullableUInt32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); + nullableUInt32.SetAccessors( + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt32, 209), + uint? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt32), + object (ValueBuffer valueBuffer) => valueBuffer[209]); + nullableUInt32.SetPropertyIndexes( + index: 209, + originalValueIndex: 209, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + keyComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + clrType: typeof(uint), + jsonValueReaderWriter: JsonUInt32ReaderWriter.Instance); + nullableUInt32.SetValueComparer(new NullableValueComparer(nullableUInt32.TypeMapping.Comparer)); + nullableUInt32.SetKeyValueComparer(new NullableValueComparer(nullableUInt32.TypeMapping.KeyComparer)); + + var nullableUInt32Array = runtimeEntityType.AddProperty( + "NullableUInt32Array", + typeof(uint?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt32Array.SetGetter( + uint? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) == null, + uint? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance) == null); + nullableUInt32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); + nullableUInt32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); + nullableUInt32Array.SetAccessors( + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt32Array, 210), + uint? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[210]); + nullableUInt32Array.SetPropertyIndexes( + index: 210, + originalValueIndex: 210, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), + keyComparer: new ValueComparer( + bool (uint? [] v1, uint? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (uint? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + uint? [] (uint? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (uint? [] v1, uint? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (uint? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + uint? [] (uint? [] source) => source.ToArray()), + clrType: typeof(uint?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonUInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + keyComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + clrType: typeof(uint), + jsonValueReaderWriter: JsonUInt32ReaderWriter.Instance)); + + var nullableUInt64 = runtimeEntityType.AddProperty( + "NullableUInt64", + typeof(ulong?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableUInt64.SetGetter( + ulong? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt64(entity).HasValue), + ulong? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt64(instance).HasValue)); + nullableUInt64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); + nullableUInt64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); + nullableUInt64.SetAccessors( + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt64, 211), + ulong? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt64), + object (ValueBuffer valueBuffer) => valueBuffer[211]); + nullableUInt64.SetPropertyIndexes( + index: 211, + originalValueIndex: 211, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + keyComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + clrType: typeof(ulong), + jsonValueReaderWriter: JsonUInt64ReaderWriter.Instance); + nullableUInt64.SetValueComparer(new NullableValueComparer(nullableUInt64.TypeMapping.Comparer)); + nullableUInt64.SetKeyValueComparer(new NullableValueComparer(nullableUInt64.TypeMapping.KeyComparer)); + + var nullableUInt64Array = runtimeEntityType.AddProperty( + "NullableUInt64Array", + typeof(ulong?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt64Array.SetGetter( + ulong? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) == null, + ulong? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance) == null); + nullableUInt64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); + nullableUInt64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); + nullableUInt64Array.SetAccessors( + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt64Array, 212), + ulong? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[212]); + nullableUInt64Array.SetPropertyIndexes( + index: 212, + originalValueIndex: 212, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), + keyComparer: new ValueComparer( + bool (ulong? [] v1, ulong? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ulong? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ulong? [] (ulong? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (ulong? [] v1, ulong? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ulong? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ulong? [] (ulong? [] source) => source.ToArray()), + clrType: typeof(ulong?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonUInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + keyComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + clrType: typeof(ulong), + jsonValueReaderWriter: JsonUInt64ReaderWriter.Instance)); + + var nullableUInt8 = runtimeEntityType.AddProperty( + "NullableUInt8", + typeof(byte?), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableUInt8.SetGetter( + byte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt8(entity).HasValue), + byte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt8(instance).HasValue)); + nullableUInt8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); + nullableUInt8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); + nullableUInt8.SetAccessors( + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt8, 213), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt8), + object (ValueBuffer valueBuffer) => valueBuffer[213]); + nullableUInt8.SetPropertyIndexes( + index: 213, + originalValueIndex: 213, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance); + nullableUInt8.SetValueComparer(new NullableValueComparer(nullableUInt8.TypeMapping.Comparer)); + nullableUInt8.SetKeyValueComparer(new NullableValueComparer(nullableUInt8.TypeMapping.KeyComparer)); + + var nullableUInt8Array = runtimeEntityType.AddProperty( + "NullableUInt8Array", + typeof(byte?[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt8Array.SetGetter( + byte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) == null, + byte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance) == null); + nullableUInt8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); + nullableUInt8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); + nullableUInt8Array.SetAccessors( + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt8Array, 214), + byte? [] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[214]); + nullableUInt8Array.SetPropertyIndexes( + index: 214, + originalValueIndex: 214, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), + keyComparer: new ValueComparer( + bool (byte? [] v1, byte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [] (byte? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte? [] v1, byte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [] (byte? [] source) => source.ToArray()), + clrType: typeof(byte?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + 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( + byte? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) == null, + byte? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance) == null); + nullableUInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); + nullableUInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); + nullableUInt8NestedCollection.SetAccessors( + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUInt8NestedCollection, 215), + byte? [][] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[215]); + nullableUInt8NestedCollection.SetPropertyIndexes( + index: 215, + originalValueIndex: 215, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt8NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), + keyComparer: new ValueComparer( + bool (byte? [][] v1, byte? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [][] (byte? [][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte? [][] v1, byte? [][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [][] (byte? [][] source) => source.ToArray()), + clrType: typeof(byte?[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new NullableValueComparer(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), + keyComparer: new ValueComparer( + bool (byte? [] v1, byte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [] (byte? [] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (byte? [] v1, byte? [] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte? [] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte? [] (byte? [] source) => source.ToArray()), + clrType: typeof(byte?[]), + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance))); + + var nullableUri = runtimeEntityType.AddProperty( + "NullableUri", + typeof(Uri), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + nullableUri.SetGetter( + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance) == null); + nullableUri.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); + nullableUri.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); + nullableUri.SetAccessors( + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUri, 216), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUri), + object (ValueBuffer valueBuffer) => valueBuffer[216]); + nullableUri.SetPropertyIndexes( + index: 216, + originalValueIndex: 216, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUri.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + keyComparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + + var nullableUriArray = runtimeEntityType.AddProperty( + "NullableUriArray", + typeof(Uri[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUriArray.SetGetter( + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance) == null); + nullableUriArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); + nullableUriArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); + nullableUriArray.SetAccessors( + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUriArray, 217), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUriArray), + object (ValueBuffer valueBuffer) => valueBuffer[217]); + nullableUriArray.SetPropertyIndexes( + index: 217, + originalValueIndex: 217, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUriArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), + keyComparer: new ValueComparer( + bool (Uri[] v1, Uri[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Uri[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Uri[] (Uri[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Uri[] v1, Uri[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Uri[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Uri[] (Uri[] source) => source.ToArray()), + clrType: typeof(Uri[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + keyComparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + + var physicalAddress = runtimeEntityType.AddProperty( + "PhysicalAddress", + typeof(PhysicalAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + physicalAddress.SetGetter( + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance) == null); + physicalAddress.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); + physicalAddress.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); + physicalAddress.SetAccessors( + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddress, 218), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[218]); + physicalAddress.SetPropertyIndexes( + index: 218, + originalValueIndex: 218, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + physicalAddress.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); + + var physicalAddressArray = runtimeEntityType.AddProperty( + "PhysicalAddressArray", + typeof(PhysicalAddress[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + physicalAddressArray.SetGetter( + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance) == null); + physicalAddressArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); + physicalAddressArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); + physicalAddressArray.SetAccessors( + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressArray, 219), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[219]); + physicalAddressArray.SetPropertyIndexes( + index: 219, + originalValueIndex: 219, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + physicalAddressArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), + keyComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (PhysicalAddress[] v1, PhysicalAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (PhysicalAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + PhysicalAddress[] (PhysicalAddress[] source) => source.ToArray()), + clrType: typeof(PhysicalAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); + + var physicalAddressToBytesConverterProperty = runtimeEntityType.AddProperty( + "PhysicalAddressToBytesConverterProperty", + typeof(PhysicalAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new PhysicalAddressToBytesConverter()); + physicalAddressToBytesConverterProperty.SetGetter( + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance) == null); + physicalAddressToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); + physicalAddressToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); + physicalAddressToBytesConverterProperty.SetAccessors( + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToBytesConverterProperty, 220), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[220]); + physicalAddressToBytesConverterProperty.SetPropertyIndexes( + index: 220, + originalValueIndex: 220, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + physicalAddressToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => Convert.ToBase64String(v.GetAddressBytes()), + PhysicalAddress (string v) => new PhysicalAddress(Convert.FromBase64String(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => Convert.ToBase64String(v.GetAddressBytes()), + PhysicalAddress (string v) => new PhysicalAddress(Convert.FromBase64String(v))))); + + var physicalAddressToStringConverterProperty = runtimeEntityType.AddProperty( + "PhysicalAddressToStringConverterProperty", + typeof(PhysicalAddress), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new PhysicalAddressToStringConverter()); + physicalAddressToStringConverterProperty.SetGetter( + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance) == null); + physicalAddressToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); + physicalAddressToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); + physicalAddressToStringConverterProperty.SetAccessors( + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToStringConverterProperty, 221), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[221]); + physicalAddressToStringConverterProperty.SetPropertyIndexes( + index: 221, + originalValueIndex: 221, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + physicalAddressToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); + + var @string = runtimeEntityType.AddProperty( + "String", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("String", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + @string.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance) == null); + @string.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); + @string.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); + @string.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(@string, 222), + string (InternalEntityEntry entry) => entry.GetCurrentValue(@string), + object (ValueBuffer valueBuffer) => valueBuffer[222]); + @string.SetPropertyIndexes( + index: 222, + originalValueIndex: 222, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + @string.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var stringArray = runtimeEntityType.AddProperty( + "StringArray", + typeof(string[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + stringArray.SetGetter( + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance) == null); + stringArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); + stringArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); + stringArray.SetAccessors( + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue(stringArray, 223), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue(stringArray), + object (ValueBuffer valueBuffer) => valueBuffer[223]); + stringArray.SetPropertyIndexes( + index: 223, + originalValueIndex: 223, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + clrType: typeof(string[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + 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( + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance) == null); + stringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); + stringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); + stringNestedCollection.SetAccessors( + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue(stringNestedCollection, 224), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue(stringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[224]); + stringNestedCollection.SetPropertyIndexes( + index: 224, + originalValueIndex: 224, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringNestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), + keyComparer: new ValueComparer( + bool (string[][] v1, string[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[][] (string[][] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[][] v1, string[][] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[][] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[][] (string[][] source) => source.ToArray()), + clrType: typeof(string[][]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string[] v1, string[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (string[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + string[] (string[] source) => source.ToArray()), + clrType: typeof(string[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance))); + + var stringToBoolConverterProperty = runtimeEntityType.AddProperty( + "StringToBoolConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToBoolConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToBoolConverter()); + stringToBoolConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance) == null); + stringToBoolConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); + stringToBoolConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); + stringToBoolConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBoolConverterProperty, 225), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBoolConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[225]); + stringToBoolConverterProperty.SetPropertyIndexes( + index: 225, + originalValueIndex: 225, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToBoolConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), + converter: new ValueConverter( + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonBoolReaderWriter.Instance, + new ValueConverter( + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)))); + + var stringToBytesConverterProperty = runtimeEntityType.AddProperty( + "StringToBytesConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToBytesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + stringToBytesConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance) == null); + stringToBytesConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); + stringToBytesConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); + stringToBytesConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBytesConverterProperty, 226), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[226]); + stringToBytesConverterProperty.SetPropertyIndexes( + index: 226, + originalValueIndex: 226, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToBytesConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (string v) => Convert.ToBase64String(Encoding.GetEncoding(12000).GetBytes(v)), + string (string v) => Encoding.GetEncoding(12000).GetString(Convert.FromBase64String(v))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (string v) => Convert.ToBase64String(Encoding.GetEncoding(12000).GetBytes(v)), + string (string v) => Encoding.GetEncoding(12000).GetString(Convert.FromBase64String(v))))); + + var stringToCharConverterProperty = runtimeEntityType.AddProperty( + "StringToCharConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToCharConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToCharConverter()); + stringToCharConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance) == null); + stringToCharConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); + stringToCharConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); + stringToCharConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToCharConverterProperty, 227), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToCharConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[227]); + stringToCharConverterProperty.SetPropertyIndexes( + index: 227, + originalValueIndex: 227, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToCharConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), + converter: new ValueConverter( + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonCharReaderWriter.Instance, + new ValueConverter( + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); + + var stringToDateOnlyConverterProperty = runtimeEntityType.AddProperty( + "StringToDateOnlyConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToDateOnlyConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToDateOnlyConverter()); + stringToDateOnlyConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance) == null); + stringToDateOnlyConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); + stringToDateOnlyConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); + stringToDateOnlyConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateOnlyConverterProperty, 228), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[228]); + stringToDateOnlyConverterProperty.SetPropertyIndexes( + index: 228, + originalValueIndex: 228, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToDateOnlyConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), + converter: new ValueConverter( + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDateOnlyReaderWriter.Instance, + new ValueConverter( + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); + + var stringToDateTimeConverterProperty = runtimeEntityType.AddProperty( + "StringToDateTimeConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToDateTimeConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToDateTimeConverter()); + stringToDateTimeConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance) == null); + stringToDateTimeConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); + stringToDateTimeConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); + stringToDateTimeConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeConverterProperty, 229), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[229]); + stringToDateTimeConverterProperty.SetPropertyIndexes( + index: 229, + originalValueIndex: 229, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToDateTimeConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + converter: new ValueConverter( + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDateTimeReaderWriter.Instance, + new ValueConverter( + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); + + var stringToDateTimeOffsetConverterProperty = runtimeEntityType.AddProperty( + "StringToDateTimeOffsetConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToDateTimeOffsetConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToDateTimeOffsetConverter()); + stringToDateTimeOffsetConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance) == null); + stringToDateTimeOffsetConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); + stringToDateTimeOffsetConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); + stringToDateTimeOffsetConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeOffsetConverterProperty, 230), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeOffsetConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[230]); + stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( + index: 230, + originalValueIndex: 230, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToDateTimeOffsetConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), + converter: new ValueConverter( + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDateTimeOffsetReaderWriter.Instance, + new ValueConverter( + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); + + var stringToDecimalNumberConverterProperty = runtimeEntityType.AddProperty( + "StringToDecimalNumberConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToDecimalNumberConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToNumberConverter()); + stringToDecimalNumberConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance) == null); + stringToDecimalNumberConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); + stringToDecimalNumberConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); + stringToDecimalNumberConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDecimalNumberConverterProperty, 231), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDecimalNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[231]); + stringToDecimalNumberConverterProperty.SetPropertyIndexes( + index: 231, + originalValueIndex: 231, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToDecimalNumberConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), + converter: new ValueConverter( + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); + + var stringToDoubleNumberConverterProperty = runtimeEntityType.AddProperty( + "StringToDoubleNumberConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToDoubleNumberConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToNumberConverter()); + stringToDoubleNumberConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance) == null); + stringToDoubleNumberConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); + stringToDoubleNumberConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); + stringToDoubleNumberConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDoubleNumberConverterProperty, 232), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDoubleNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[232]); + stringToDoubleNumberConverterProperty.SetPropertyIndexes( + index: 232, + originalValueIndex: 232, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToDoubleNumberConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), + converter: new ValueConverter( + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDoubleReaderWriter.Instance, + new ValueConverter( + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))))); + + var stringToEnumConverterProperty = runtimeEntityType.AddProperty( + "StringToEnumConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToEnumConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToEnumConverter()); + stringToEnumConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance) == null); + stringToEnumConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); + stringToEnumConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); + stringToEnumConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToEnumConverterProperty, 233), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToEnumConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[233]); + stringToEnumConverterProperty.SetPropertyIndexes( + index: 233, + originalValueIndex: 233, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToEnumConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + converter: new ValueConverter( + uint (string v) => ((uint)(StringEnumConverter.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonUInt32ReaderWriter.Instance, + new ValueConverter( + uint (string v) => ((uint)(StringEnumConverter.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()))); + + var stringToGuidConverterProperty = runtimeEntityType.AddProperty( + "StringToGuidConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToGuidConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + stringToGuidConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance) == null); + stringToGuidConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); + stringToGuidConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); + stringToGuidConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToGuidConverterProperty, 234), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToGuidConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[234]); + stringToGuidConverterProperty.SetPropertyIndexes( + index: 234, + originalValueIndex: 234, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToGuidConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var stringToIntNumberConverterProperty = runtimeEntityType.AddProperty( + "StringToIntNumberConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToIntNumberConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToNumberConverter()); + stringToIntNumberConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance) == null); + stringToIntNumberConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); + stringToIntNumberConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); + stringToIntNumberConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToIntNumberConverterProperty, 235), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToIntNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[235]); + stringToIntNumberConverterProperty.SetPropertyIndexes( + index: 235, + originalValueIndex: 235, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToIntNumberConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); + + var stringToTimeOnlyConverterProperty = runtimeEntityType.AddProperty( + "StringToTimeOnlyConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToTimeOnlyConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToTimeOnlyConverter()); + stringToTimeOnlyConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance) == null); + stringToTimeOnlyConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); + stringToTimeOnlyConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); + stringToTimeOnlyConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeOnlyConverterProperty, 236), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[236]); + stringToTimeOnlyConverterProperty.SetPropertyIndexes( + index: 236, + originalValueIndex: 236, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToTimeOnlyConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + converter: new ValueConverter( + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonTimeOnlyReaderWriter.Instance, + new ValueConverter( + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))))); + + var stringToTimeSpanConverterProperty = runtimeEntityType.AddProperty( + "StringToTimeSpanConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToTimeSpanConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToTimeSpanConverter()); + stringToTimeSpanConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance) == null); + stringToTimeSpanConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); + stringToTimeSpanConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); + stringToTimeSpanConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeSpanConverterProperty, 237), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeSpanConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[237]); + stringToTimeSpanConverterProperty.SetPropertyIndexes( + index: 237, + originalValueIndex: 237, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToTimeSpanConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + converter: new ValueConverter( + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonTimeSpanReaderWriter.Instance, + new ValueConverter( + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")))); + + var stringToUriConverterProperty = runtimeEntityType.AddProperty( + "StringToUriConverterProperty", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToUriConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new StringToUriConverter()); + stringToUriConverterProperty.SetGetter( + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance) == null); + stringToUriConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); + stringToUriConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); + stringToUriConverterProperty.SetAccessors( + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToUriConverterProperty, 238), + string (InternalEntityEntry entry) => entry.GetCurrentValue(stringToUriConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[238]); + stringToUriConverterProperty.SetPropertyIndexes( + index: 238, + originalValueIndex: 238, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringToUriConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); + + var timeOnly = runtimeEntityType.AddProperty( + "TimeOnly", + typeof(TimeOnly), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnly", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: new TimeOnly(0, 0, 0)); + timeOnly.SetGetter( + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance) == default(TimeOnly)); + timeOnly.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); + timeOnly.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); + timeOnly.SetAccessors( + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnly, 239), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[239]); + timeOnly.SetPropertyIndexes( + index: 239, + originalValueIndex: 239, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeOnly.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + clrType: typeof(TimeOnly), + jsonValueReaderWriter: JsonTimeOnlyReaderWriter.Instance); + + var timeOnlyArray = runtimeEntityType.AddProperty( + "TimeOnlyArray", + typeof(TimeOnly[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + timeOnlyArray.SetGetter( + TimeOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) == null, + TimeOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance) == null); + timeOnlyArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); + timeOnlyArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); + timeOnlyArray.SetAccessors( + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyArray, 240), + TimeOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[240]); + timeOnlyArray.SetPropertyIndexes( + index: 240, + originalValueIndex: 240, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeOnlyArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), + keyComparer: new ValueComparer( + bool (TimeOnly[] v1, TimeOnly[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeOnly[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeOnly[] (TimeOnly[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (TimeOnly[] v1, TimeOnly[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeOnly[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeOnly[] (TimeOnly[] source) => source.ToArray()), + clrType: typeof(TimeOnly[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonTimeOnlyReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + clrType: typeof(TimeOnly), + jsonValueReaderWriter: JsonTimeOnlyReaderWriter.Instance)); + + var timeOnlyToStringConverterProperty = runtimeEntityType.AddProperty( + "TimeOnlyToStringConverterProperty", + typeof(TimeOnly), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new TimeOnlyToStringConverter()); + timeOnlyToStringConverterProperty.SetGetter( + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); + timeOnlyToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); + timeOnlyToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); + timeOnlyToStringConverterProperty.SetAccessors( + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToStringConverterProperty, 241), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[241]); + timeOnlyToStringConverterProperty.SetPropertyIndexes( + index: 241, + originalValueIndex: 241, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeOnlyToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + timeOnlyToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); + + var timeOnlyToTicksConverterProperty = runtimeEntityType.AddProperty( + "TimeOnlyToTicksConverterProperty", + typeof(TimeOnly), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyToTicksConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new TimeOnlyToTicksConverter()); + timeOnlyToTicksConverterProperty.SetGetter( + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); + timeOnlyToTicksConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); + timeOnlyToTicksConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); + timeOnlyToTicksConverterProperty.SetAccessors( + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToTicksConverterProperty, 242), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[242]); + timeOnlyToTicksConverterProperty.SetPropertyIndexes( + index: 242, + originalValueIndex: 242, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeOnlyToTicksConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + keyComparer: new ValueComparer( + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)))); + timeOnlyToTicksConverterProperty.SetSentinelFromProviderValue(0L); + + var timeSpan = runtimeEntityType.AddProperty( + "TimeSpan", + typeof(TimeSpan), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpan", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: new TimeSpan(0, 0, 0, 0, 0)); + timeSpan.SetGetter( + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance) == default(TimeSpan)); + timeSpan.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); + timeSpan.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); + timeSpan.SetAccessors( + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpan, 243), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[243]); + timeSpan.SetPropertyIndexes( + index: 243, + originalValueIndex: 243, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeSpan.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + clrType: typeof(TimeSpan), + jsonValueReaderWriter: JsonTimeSpanReaderWriter.Instance); + + var timeSpanArray = runtimeEntityType.AddProperty( + "TimeSpanArray", + typeof(TimeSpan[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + timeSpanArray.SetGetter( + TimeSpan[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) == null, + TimeSpan[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance) == null); + timeSpanArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); + timeSpanArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); + timeSpanArray.SetAccessors( + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanArray, 244), + TimeSpan[] (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[244]); + timeSpanArray.SetPropertyIndexes( + index: 244, + originalValueIndex: 244, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeSpanArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), + keyComparer: new ValueComparer( + bool (TimeSpan[] v1, TimeSpan[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeSpan[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeSpan[] (TimeSpan[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (TimeSpan[] v1, TimeSpan[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (TimeSpan[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + TimeSpan[] (TimeSpan[] source) => source.ToArray()), + clrType: typeof(TimeSpan[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonTimeSpanReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + clrType: typeof(TimeSpan), + jsonValueReaderWriter: JsonTimeSpanReaderWriter.Instance)); + + var timeSpanToStringConverterProperty = runtimeEntityType.AddProperty( + "TimeSpanToStringConverterProperty", + typeof(TimeSpan), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new TimeSpanToStringConverter()); + timeSpanToStringConverterProperty.SetGetter( + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); + timeSpanToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); + timeSpanToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); + timeSpanToStringConverterProperty.SetAccessors( + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToStringConverterProperty, 245), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[245]); + timeSpanToStringConverterProperty.SetPropertyIndexes( + index: 245, + originalValueIndex: 245, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeSpanToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); + timeSpanToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); + + var timeSpanToTicksConverterProperty = runtimeEntityType.AddProperty( + "TimeSpanToTicksConverterProperty", + typeof(TimeSpan), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanToTicksConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new TimeSpanToTicksConverter()); + timeSpanToTicksConverterProperty.SetGetter( + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); + timeSpanToTicksConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); + timeSpanToTicksConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); + timeSpanToTicksConverterProperty.SetAccessors( + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToTicksConverterProperty, 246), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[246]); + timeSpanToTicksConverterProperty.SetPropertyIndexes( + index: 246, + originalValueIndex: 246, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + timeSpanToTicksConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + keyComparer: new ValueComparer( + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + converter: new ValueConverter( + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt64ReaderWriter.Instance, + new ValueConverter( + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)))); + timeSpanToTicksConverterProperty.SetSentinelFromProviderValue(0L); + + var uInt16 = runtimeEntityType.AddProperty( + "UInt16", + typeof(ushort), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: (ushort)0); + uInt16.SetGetter( + ushort (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity) == 0, + ushort (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance) == 0); + uInt16.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); + uInt16.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); + uInt16.SetAccessors( + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16, 247), + ushort (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16), + object (ValueBuffer valueBuffer) => valueBuffer[247]); + uInt16.SetPropertyIndexes( + index: 247, + originalValueIndex: 247, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt16.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + keyComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + clrType: typeof(ushort), + jsonValueReaderWriter: JsonUInt16ReaderWriter.Instance); + + var uInt16Array = runtimeEntityType.AddProperty( + "UInt16Array", + typeof(ushort[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt16Array.SetGetter( + ushort[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity) == null, + ushort[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance) == null); + uInt16Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); + uInt16Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); + uInt16Array.SetAccessors( + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16Array, 248), + ushort[] (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[248]); + uInt16Array.SetPropertyIndexes( + index: 248, + originalValueIndex: 248, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt16Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), + keyComparer: new ValueComparer( + bool (ushort[] v1, ushort[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ushort[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ushort[] (ushort[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (ushort[] v1, ushort[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ushort[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ushort[] (ushort[] source) => source.ToArray()), + clrType: typeof(ushort[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonUInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + keyComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + providerValueComparer: new ValueComparer( + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), + clrType: typeof(ushort), + jsonValueReaderWriter: JsonUInt16ReaderWriter.Instance)); + + var uInt32 = runtimeEntityType.AddProperty( + "UInt32", + typeof(uint), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0u); + uInt32.SetGetter( + uint (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity) == 0U, + uint (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance) == 0U); + uInt32.SetSetter( + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); + uInt32.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); + uInt32.SetAccessors( + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32, 249), + uint (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32), + object (ValueBuffer valueBuffer) => valueBuffer[249]); + uInt32.SetPropertyIndexes( + index: 249, + originalValueIndex: 249, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt32.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + keyComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + clrType: typeof(uint), + jsonValueReaderWriter: JsonUInt32ReaderWriter.Instance); + + var uInt32Array = runtimeEntityType.AddProperty( + "UInt32Array", + typeof(uint[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt32Array.SetGetter( + uint[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity) == null, + uint[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance) == null); + uInt32Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); + uInt32Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); + uInt32Array.SetAccessors( + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32Array, 250), + uint[] (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[250]); + uInt32Array.SetPropertyIndexes( + index: 250, + originalValueIndex: 250, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt32Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), + keyComparer: new ValueComparer( + bool (uint[] v1, uint[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (uint[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + uint[] (uint[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (uint[] v1, uint[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (uint[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + uint[] (uint[] source) => source.ToArray()), + clrType: typeof(uint[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonUInt32ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + keyComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + providerValueComparer: new ValueComparer( + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), + clrType: typeof(uint), + jsonValueReaderWriter: JsonUInt32ReaderWriter.Instance)); + + var uInt64 = runtimeEntityType.AddProperty( + "UInt64", + typeof(ulong), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0ul); + uInt64.SetGetter( + ulong (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity) == 0UL, + ulong (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance) == 0UL); + uInt64.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); + uInt64.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); + uInt64.SetAccessors( + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64, 251), + ulong (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64), + object (ValueBuffer valueBuffer) => valueBuffer[251]); + uInt64.SetPropertyIndexes( + index: 251, + originalValueIndex: 251, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt64.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + keyComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + clrType: typeof(ulong), + jsonValueReaderWriter: JsonUInt64ReaderWriter.Instance); + + var uInt64Array = runtimeEntityType.AddProperty( + "UInt64Array", + typeof(ulong[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt64Array.SetGetter( + ulong[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity) == null, + ulong[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance) == null); + uInt64Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); + uInt64Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); + uInt64Array.SetAccessors( + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64Array, 252), + ulong[] (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[252]); + uInt64Array.SetPropertyIndexes( + index: 252, + originalValueIndex: 252, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt64Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), + keyComparer: new ValueComparer( + bool (ulong[] v1, ulong[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ulong[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ulong[] (ulong[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (ulong[] v1, ulong[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (ulong[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + ulong[] (ulong[] source) => source.ToArray()), + clrType: typeof(ulong[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonUInt64ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + keyComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + providerValueComparer: new ValueComparer( + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), + clrType: typeof(ulong), + jsonValueReaderWriter: JsonUInt64ReaderWriter.Instance)); + + var uInt8 = runtimeEntityType.AddProperty( + "UInt8", + typeof(byte), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: (byte)0); + uInt8.SetGetter( + byte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity) == 0, + byte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance) == 0); + uInt8.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); + uInt8.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); + uInt8.SetAccessors( + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8, 253), + byte (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8), + object (ValueBuffer valueBuffer) => valueBuffer[253]); + uInt8.SetPropertyIndexes( + index: 253, + originalValueIndex: 253, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt8.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance); + + var uInt8Array = runtimeEntityType.AddProperty( + "UInt8Array", + typeof(byte[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt8Array.SetGetter( + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance) == null); + uInt8Array.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); + uInt8Array.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); + uInt8Array.SetAccessors( + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8Array, 254), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[254]); + uInt8Array.SetPropertyIndexes( + index: 254, + originalValueIndex: 254, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt8Array.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); + + 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( + List (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) == null, + List (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance) == null); + uInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); + uInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); + uInt8NestedCollection.SetAccessors( + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(uInt8NestedCollection, 255), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(uInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[255]); + uInt8NestedCollection.SetPropertyIndexes( + index: 255, + originalValueIndex: 255, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt8NestedCollection.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, byte[]>(new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, byte[]>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v))))); + + var uri = runtimeEntityType.AddProperty( + "Uri", + typeof(Uri), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Uri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uri.SetGetter( + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance) == null); + uri.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); + uri.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); + uri.SetAccessors( + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue(uri, 256), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue(uri), + object (ValueBuffer valueBuffer) => valueBuffer[256]); + uri.SetPropertyIndexes( + index: 256, + originalValueIndex: 256, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uri.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + keyComparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + + var uriArray = runtimeEntityType.AddProperty( + "UriArray", + typeof(Uri[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uriArray.SetGetter( + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance) == null); + uriArray.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); + uriArray.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); + uriArray.SetAccessors( + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue(uriArray, 257), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue(uriArray), + object (ValueBuffer valueBuffer) => valueBuffer[257]); + uriArray.SetPropertyIndexes( + index: 257, + originalValueIndex: 257, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uriArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), + keyComparer: new ValueComparer( + bool (Uri[] v1, Uri[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Uri[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Uri[] (Uri[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (Uri[] v1, Uri[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (Uri[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + Uri[] (Uri[] source) => source.ToArray()), + clrType: typeof(Uri[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + keyComparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + + var uriToStringConverterProperty = runtimeEntityType.AddProperty( + "UriToStringConverterProperty", + typeof(Uri), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + valueConverter: new UriToStringConverter()); + uriToStringConverterProperty.SetGetter( + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance) == null); + uriToStringConverterProperty.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); + uriToStringConverterProperty.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); + uriToStringConverterProperty.SetAccessors( + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue(uriToStringConverterProperty, 258), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue(uriToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[258]); + uriToStringConverterProperty.SetPropertyIndexes( + index: 258, + originalValueIndex: 258, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uriToStringConverterProperty.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + keyComparer: new ValueComparer( + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + + var __id = runtimeEntityType.AddProperty( + "__id", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new IdValueGeneratorFactory().Create); + __id.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 259), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 1), + object (ValueBuffer valueBuffer) => valueBuffer[259]); + __id.SetPropertyIndexes( + index: 259, + originalValueIndex: 259, + shadowIndex: 1, + relationshipIndex: 1, + storeGenerationIndex: -1); + __id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); + __id.AddAnnotation("Cosmos:PropertyName", "id"); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + nullable: true, + valueGenerated: ValueGenerated.OnAddOrUpdate, + beforeSaveBehavior: PropertySaveBehavior.Ignore, + afterSaveBehavior: PropertySaveBehavior.Ignore); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(260) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(260) && entry.ReadShadowValue(2) == null ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(2))), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(2), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 260), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[260]); + __jObject.SetPropertyIndexes( + index: 260, + originalValueIndex: 260, + shadowIndex: 2, + relationshipIndex: -1, + storeGenerationIndex: 1); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var key = runtimeEntityType.AddKey( + new[] { id }); + runtimeEntityType.SetPrimaryKey(key); + + var key0 = runtimeEntityType.AddKey( + new[] { __id }); + + return runtimeEntityType; + } + + 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")!; + var dateOnlyToStringConverterProperty = runtimeEntityType.FindProperty("DateOnlyToStringConverterProperty")!; + var dateTime = runtimeEntityType.FindProperty("DateTime")!; + var dateTimeArray = runtimeEntityType.FindProperty("DateTimeArray")!; + var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.FindProperty("DateTimeOffsetToBinaryConverterProperty")!; + var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.FindProperty("DateTimeOffsetToBytesConverterProperty")!; + var dateTimeOffsetToStringConverterProperty = runtimeEntityType.FindProperty("DateTimeOffsetToStringConverterProperty")!; + var dateTimeToBinaryConverterProperty = runtimeEntityType.FindProperty("DateTimeToBinaryConverterProperty")!; + var dateTimeToStringConverterProperty = runtimeEntityType.FindProperty("DateTimeToStringConverterProperty")!; + var dateTimeToTicksConverterProperty = runtimeEntityType.FindProperty("DateTimeToTicksConverterProperty")!; + var @decimal = runtimeEntityType.FindProperty("Decimal")!; + var decimalArray = runtimeEntityType.FindProperty("DecimalArray")!; + var decimalNumberToBytesConverterProperty = runtimeEntityType.FindProperty("DecimalNumberToBytesConverterProperty")!; + var decimalNumberToStringConverterProperty = runtimeEntityType.FindProperty("DecimalNumberToStringConverterProperty")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var @double = runtimeEntityType.FindProperty("Double")!; + var doubleArray = runtimeEntityType.FindProperty("DoubleArray")!; + var doubleNumberToBytesConverterProperty = runtimeEntityType.FindProperty("DoubleNumberToBytesConverterProperty")!; + var doubleNumberToStringConverterProperty = runtimeEntityType.FindProperty("DoubleNumberToStringConverterProperty")!; + var enum16 = runtimeEntityType.FindProperty("Enum16")!; + var enum16Array = runtimeEntityType.FindProperty("Enum16Array")!; + var enum16AsString = runtimeEntityType.FindProperty("Enum16AsString")!; + var enum16AsStringArray = runtimeEntityType.FindProperty("Enum16AsStringArray")!; + var enum16AsStringCollection = runtimeEntityType.FindProperty("Enum16AsStringCollection")!; + var enum16Collection = runtimeEntityType.FindProperty("Enum16Collection")!; + var enum32 = runtimeEntityType.FindProperty("Enum32")!; + var enum32Array = runtimeEntityType.FindProperty("Enum32Array")!; + var enum32AsString = runtimeEntityType.FindProperty("Enum32AsString")!; + 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")!; + var enum64AsStringArray = runtimeEntityType.FindProperty("Enum64AsStringArray")!; + var enum64AsStringCollection = runtimeEntityType.FindProperty("Enum64AsStringCollection")!; + var enum64Collection = runtimeEntityType.FindProperty("Enum64Collection")!; + var enum8 = runtimeEntityType.FindProperty("Enum8")!; + var enum8Array = runtimeEntityType.FindProperty("Enum8Array")!; + var enum8AsString = runtimeEntityType.FindProperty("Enum8AsString")!; + 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")!; + var enumU16Array = runtimeEntityType.FindProperty("EnumU16Array")!; + var enumU16AsString = runtimeEntityType.FindProperty("EnumU16AsString")!; + var enumU16AsStringArray = runtimeEntityType.FindProperty("EnumU16AsStringArray")!; + var enumU16AsStringCollection = runtimeEntityType.FindProperty("EnumU16AsStringCollection")!; + var enumU16Collection = runtimeEntityType.FindProperty("EnumU16Collection")!; + var enumU32 = runtimeEntityType.FindProperty("EnumU32")!; + var enumU32Array = runtimeEntityType.FindProperty("EnumU32Array")!; + var enumU32AsString = runtimeEntityType.FindProperty("EnumU32AsString")!; + var enumU32AsStringArray = runtimeEntityType.FindProperty("EnumU32AsStringArray")!; + var enumU32AsStringCollection = runtimeEntityType.FindProperty("EnumU32AsStringCollection")!; + var enumU32Collection = runtimeEntityType.FindProperty("EnumU32Collection")!; + var enumU64 = runtimeEntityType.FindProperty("EnumU64")!; + var enumU64Array = runtimeEntityType.FindProperty("EnumU64Array")!; + var enumU64AsString = runtimeEntityType.FindProperty("EnumU64AsString")!; + 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")!; + var enumU8AsStringArray = runtimeEntityType.FindProperty("EnumU8AsStringArray")!; + var enumU8AsStringCollection = runtimeEntityType.FindProperty("EnumU8AsStringCollection")!; + var enumU8Collection = runtimeEntityType.FindProperty("EnumU8Collection")!; + var @float = runtimeEntityType.FindProperty("Float")!; + 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")!; + var iPAddressArray = runtimeEntityType.FindProperty("IPAddressArray")!; + var iPAddressToBytesConverterProperty = runtimeEntityType.FindProperty("IPAddressToBytesConverterProperty")!; + var iPAddressToStringConverterProperty = runtimeEntityType.FindProperty("IPAddressToStringConverterProperty")!; + var int16 = runtimeEntityType.FindProperty("Int16")!; + 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")!; + var nullableBool = runtimeEntityType.FindProperty("NullableBool")!; + 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")!; + var nullableDateOnlyArray = runtimeEntityType.FindProperty("NullableDateOnlyArray")!; + var nullableDateTime = runtimeEntityType.FindProperty("NullableDateTime")!; + var nullableDateTimeArray = runtimeEntityType.FindProperty("NullableDateTimeArray")!; + var nullableDecimal = runtimeEntityType.FindProperty("NullableDecimal")!; + var nullableDecimalArray = runtimeEntityType.FindProperty("NullableDecimalArray")!; + var nullableDouble = runtimeEntityType.FindProperty("NullableDouble")!; + var nullableDoubleArray = runtimeEntityType.FindProperty("NullableDoubleArray")!; + var nullableEnum16 = runtimeEntityType.FindProperty("NullableEnum16")!; + var nullableEnum16Array = runtimeEntityType.FindProperty("NullableEnum16Array")!; + var nullableEnum16AsString = runtimeEntityType.FindProperty("NullableEnum16AsString")!; + var nullableEnum16AsStringArray = runtimeEntityType.FindProperty("NullableEnum16AsStringArray")!; + var nullableEnum16AsStringCollection = runtimeEntityType.FindProperty("NullableEnum16AsStringCollection")!; + var nullableEnum16Collection = runtimeEntityType.FindProperty("NullableEnum16Collection")!; + var nullableEnum32 = runtimeEntityType.FindProperty("NullableEnum32")!; + var nullableEnum32Array = runtimeEntityType.FindProperty("NullableEnum32Array")!; + var nullableEnum32AsString = runtimeEntityType.FindProperty("NullableEnum32AsString")!; + 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")!; + var nullableEnum64AsStringArray = runtimeEntityType.FindProperty("NullableEnum64AsStringArray")!; + var nullableEnum64AsStringCollection = runtimeEntityType.FindProperty("NullableEnum64AsStringCollection")!; + var nullableEnum64Collection = runtimeEntityType.FindProperty("NullableEnum64Collection")!; + var nullableEnum8 = runtimeEntityType.FindProperty("NullableEnum8")!; + var nullableEnum8Array = runtimeEntityType.FindProperty("NullableEnum8Array")!; + var nullableEnum8AsString = runtimeEntityType.FindProperty("NullableEnum8AsString")!; + 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")!; + var nullableEnumU16AsStringArray = runtimeEntityType.FindProperty("NullableEnumU16AsStringArray")!; + var nullableEnumU16AsStringCollection = runtimeEntityType.FindProperty("NullableEnumU16AsStringCollection")!; + var nullableEnumU16Collection = runtimeEntityType.FindProperty("NullableEnumU16Collection")!; + var nullableEnumU32 = runtimeEntityType.FindProperty("NullableEnumU32")!; + var nullableEnumU32Array = runtimeEntityType.FindProperty("NullableEnumU32Array")!; + var nullableEnumU32AsString = runtimeEntityType.FindProperty("NullableEnumU32AsString")!; + var nullableEnumU32AsStringArray = runtimeEntityType.FindProperty("NullableEnumU32AsStringArray")!; + var nullableEnumU32AsStringCollection = runtimeEntityType.FindProperty("NullableEnumU32AsStringCollection")!; + var nullableEnumU32Collection = runtimeEntityType.FindProperty("NullableEnumU32Collection")!; + var nullableEnumU64 = runtimeEntityType.FindProperty("NullableEnumU64")!; + var nullableEnumU64Array = runtimeEntityType.FindProperty("NullableEnumU64Array")!; + var nullableEnumU64AsString = runtimeEntityType.FindProperty("NullableEnumU64AsString")!; + 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")!; + var nullableEnumU8AsStringArray = runtimeEntityType.FindProperty("NullableEnumU8AsStringArray")!; + var nullableEnumU8AsStringCollection = runtimeEntityType.FindProperty("NullableEnumU8AsStringCollection")!; + var nullableEnumU8Collection = runtimeEntityType.FindProperty("NullableEnumU8Collection")!; + var nullableFloat = runtimeEntityType.FindProperty("NullableFloat")!; + 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")!; + var nullableTimeSpanArray = runtimeEntityType.FindProperty("NullableTimeSpanArray")!; + var nullableUInt16 = runtimeEntityType.FindProperty("NullableUInt16")!; + var nullableUInt16Array = runtimeEntityType.FindProperty("NullableUInt16Array")!; + var nullableUInt32 = runtimeEntityType.FindProperty("NullableUInt32")!; + var nullableUInt32Array = runtimeEntityType.FindProperty("NullableUInt32Array")!; + var nullableUInt64 = runtimeEntityType.FindProperty("NullableUInt64")!; + 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")!; + var physicalAddressArray = runtimeEntityType.FindProperty("PhysicalAddressArray")!; + var physicalAddressToBytesConverterProperty = runtimeEntityType.FindProperty("PhysicalAddressToBytesConverterProperty")!; + 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")!; + var stringToDateOnlyConverterProperty = runtimeEntityType.FindProperty("StringToDateOnlyConverterProperty")!; + var stringToDateTimeConverterProperty = runtimeEntityType.FindProperty("StringToDateTimeConverterProperty")!; + var stringToDateTimeOffsetConverterProperty = runtimeEntityType.FindProperty("StringToDateTimeOffsetConverterProperty")!; + var stringToDecimalNumberConverterProperty = runtimeEntityType.FindProperty("StringToDecimalNumberConverterProperty")!; + var stringToDoubleNumberConverterProperty = runtimeEntityType.FindProperty("StringToDoubleNumberConverterProperty")!; + var stringToEnumConverterProperty = runtimeEntityType.FindProperty("StringToEnumConverterProperty")!; + var stringToGuidConverterProperty = runtimeEntityType.FindProperty("StringToGuidConverterProperty")!; + var stringToIntNumberConverterProperty = runtimeEntityType.FindProperty("StringToIntNumberConverterProperty")!; + var stringToTimeOnlyConverterProperty = runtimeEntityType.FindProperty("StringToTimeOnlyConverterProperty")!; + var stringToTimeSpanConverterProperty = runtimeEntityType.FindProperty("StringToTimeSpanConverterProperty")!; + var stringToUriConverterProperty = runtimeEntityType.FindProperty("StringToUriConverterProperty")!; + var timeOnly = runtimeEntityType.FindProperty("TimeOnly")!; + var timeOnlyArray = runtimeEntityType.FindProperty("TimeOnlyArray")!; + var timeOnlyToStringConverterProperty = runtimeEntityType.FindProperty("TimeOnlyToStringConverterProperty")!; + var timeOnlyToTicksConverterProperty = runtimeEntityType.FindProperty("TimeOnlyToTicksConverterProperty")!; + var timeSpan = runtimeEntityType.FindProperty("TimeSpan")!; + var timeSpanArray = runtimeEntityType.FindProperty("TimeSpanArray")!; + var timeSpanToStringConverterProperty = runtimeEntityType.FindProperty("TimeSpanToStringConverterProperty")!; + var timeSpanToTicksConverterProperty = runtimeEntityType.FindProperty("TimeSpanToTicksConverterProperty")!; + var uInt16 = runtimeEntityType.FindProperty("UInt16")!; + var uInt16Array = runtimeEntityType.FindProperty("UInt16Array")!; + var uInt32 = runtimeEntityType.FindProperty("UInt32")!; + var uInt32Array = runtimeEntityType.FindProperty("UInt32Array")!; + var uInt64 = runtimeEntityType.FindProperty("UInt64")!; + 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")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var key = runtimeEntityType.FindKey(new[] { id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); + var key0 = runtimeEntityType.FindKey(new[] { __id }); + key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key0)); + key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key0)); + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)(((IProperty)@bool).GetValueComparer())).Snapshot(source.GetCurrentValue(@bool)), (((IEnumerable)(source.GetCurrentValue(boolArray))) == null ? null : ((bool[])(((ValueComparer>)(((IProperty)boolArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(boolArray))))))), (((object)(source.GetCurrentValue(boolNestedCollection))) == null ? null : ((bool[][])(((ValueComparer)(((IProperty)boolNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(boolNestedCollection))))))), ((ValueComparer)(((IProperty)boolToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(boolToStringConverterProperty)), ((ValueComparer)(((IProperty)boolToTwoValuesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(boolToTwoValuesConverterProperty)), ((ValueComparer)(((IProperty)boolToZeroOneConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(boolToZeroOneConverterProperty)), (source.GetCurrentValue(bytes) == null ? null : ((ValueComparer)(((IProperty)bytes).GetValueComparer())).Snapshot(source.GetCurrentValue(bytes))), (((object)(source.GetCurrentValue(bytesArray))) == null ? null : ((byte[][])(((ValueComparer)(((IProperty)bytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(bytesArray))))))), (((object)(source.GetCurrentValue(bytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer)(((IProperty)bytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(bytesNestedCollection))))))), (source.GetCurrentValue(bytesToStringConverterProperty) == null ? null : ((ValueComparer)(((IProperty)bytesToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(bytesToStringConverterProperty))), ((ValueComparer)(((IProperty)castingConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(castingConverterProperty)), ((ValueComparer)(((IProperty)@char).GetValueComparer())).Snapshot(source.GetCurrentValue(@char)), (((IEnumerable)(source.GetCurrentValue(charArray))) == null ? null : ((char[])(((ValueComparer>)(((IProperty)charArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(charArray))))))), (((object)(source.GetCurrentValue(charNestedCollection))) == null ? null : ((char[][])(((ValueComparer)(((IProperty)charNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(charNestedCollection))))))), ((ValueComparer)(((IProperty)charToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(charToStringConverterProperty)), ((ValueComparer)(((IProperty)dateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue(dateOnly)), (((IEnumerable)(source.GetCurrentValue(dateOnlyArray))) == null ? null : ((DateOnly[])(((ValueComparer>)(((IProperty)dateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(dateOnlyArray))))))), ((ValueComparer)(((IProperty)dateOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateOnlyToStringConverterProperty)), ((ValueComparer)(((IProperty)dateTime).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTime)), (((IEnumerable)(source.GetCurrentValue(dateTimeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)dateTimeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(dateTimeArray))))))), ((ValueComparer)(((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer)(((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer)(((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeOffsetToStringConverterProperty)), ((ValueComparer)(((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeToBinaryConverterProperty)), ((ValueComparer)(((IProperty)dateTimeToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeToStringConverterProperty)), ((ValueComparer)(((IProperty)dateTimeToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(dateTimeToTicksConverterProperty)), ((ValueComparer)(((IProperty)@decimal).GetValueComparer())).Snapshot(source.GetCurrentValue(@decimal)), (((IEnumerable)(source.GetCurrentValue(decimalArray))) == null ? null : ((decimal[])(((ValueComparer>)(((IProperty)decimalArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(decimalArray))))))), ((ValueComparer)(((IProperty)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, List[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List, List, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List>(((ValueComparer)(((IProperty)decimalNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(decimalNumberToStringConverterProperty)), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)@double).GetValueComparer())).Snapshot(source.GetCurrentValue(@double)), (((IEnumerable)(source.GetCurrentValue(doubleArray))) == null ? null : ((double[])(((ValueComparer>)(((IProperty)doubleArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(doubleArray))))))), ((ValueComparer)(((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(doubleNumberToBytesConverterProperty)), ((ValueComparer)(((IProperty)doubleNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(doubleNumberToStringConverterProperty)), ((ValueComparer)(((IProperty)enum16).GetValueComparer())).Snapshot(source.GetCurrentValue(enum16)), (((IEnumerable)(source.GetCurrentValue(enum16Array))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer>)(((IProperty)enum16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum16Array))))))), ((ValueComparer)(((IProperty)enum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enum16AsString)), (((IEnumerable)(source.GetCurrentValue(enum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer>)(((IProperty)enum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum16AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enum16AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum16AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enum16Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum16Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum16Collection))))))), ((ValueComparer)(((IProperty)enum32).GetValueComparer())).Snapshot(source.GetCurrentValue(enum32)), (((IEnumerable)(source.GetCurrentValue(enum32Array))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer>)(((IProperty)enum32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum32Array))))))), ((ValueComparer)(((IProperty)enum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enum32AsString)), (((IEnumerable)(source.GetCurrentValue(enum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer>)(((IProperty)enum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum32AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enum32AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum32AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enum32Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum32Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum32Collection))))))), (((object)(source.GetCurrentValue[][]>(enum32NestedCollection))) == null ? null : ((List[][])(((ValueComparer)(((IProperty)enum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue[][]>(enum32NestedCollection))))))), ((ValueComparer)(((IProperty)enum64).GetValueComparer())).Snapshot(source.GetCurrentValue(enum64)), (((IEnumerable)(source.GetCurrentValue(enum64Array))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer>)(((IProperty)enum64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum64Array))))))), ((ValueComparer)(((IProperty)enum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enum64AsString)), (((IEnumerable)(source.GetCurrentValue(enum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer>)(((IProperty)enum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum64AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enum64AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum64AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enum64Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum64Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum64Collection))))))), ((ValueComparer)(((IProperty)enum8).GetValueComparer())).Snapshot(source.GetCurrentValue(enum8)), (((IEnumerable)(source.GetCurrentValue(enum8Array))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer>)(((IProperty)enum8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum8Array))))))), ((ValueComparer)(((IProperty)enum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enum8AsString)), (((IEnumerable)(source.GetCurrentValue(enum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer>)(((IProperty)enum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enum8AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enum8AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum8AsStringCollection)))))))))); + var entity1 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg1 = ((ISnapshot)(new Snapshot, CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List, 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>((((IEnumerable)(source.GetCurrentValue>(enum8Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enum8Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enum8Collection))))))), (((object)(source.GetCurrentValue(enum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8[][])(((ValueComparer)(((IProperty)enum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(enum8NestedCollection))))))), ((ValueComparer)(((IProperty)enumToNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(enumToNumberConverterProperty)), ((ValueComparer)(((IProperty)enumToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(enumToStringConverterProperty)), ((ValueComparer)(((IProperty)enumU16).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU16)), (((IEnumerable)(source.GetCurrentValue(enumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer>)(((IProperty)enumU16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU16Array))))))), ((ValueComparer)(((IProperty)enumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU16AsString)), (((IEnumerable)(source.GetCurrentValue(enumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer>)(((IProperty)enumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU16AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enumU16AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU16AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enumU16Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU16Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU16Collection))))))), ((ValueComparer)(((IProperty)enumU32).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU32)), (((IEnumerable)(source.GetCurrentValue(enumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer>)(((IProperty)enumU32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU32Array))))))), ((ValueComparer)(((IProperty)enumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU32AsString)), (((IEnumerable)(source.GetCurrentValue(enumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer>)(((IProperty)enumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU32AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enumU32AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU32AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enumU32Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU32Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU32Collection))))))), ((ValueComparer)(((IProperty)enumU64).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU64)), (((IEnumerable)(source.GetCurrentValue(enumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer>)(((IProperty)enumU64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU64Array))))))), ((ValueComparer)(((IProperty)enumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU64AsString)), (((IEnumerable)(source.GetCurrentValue(enumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer>)(((IProperty)enumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU64AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enumU64AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU64AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enumU64Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU64Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU64Collection))))))), (((object)(source.GetCurrentValue(enumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64[][])(((ValueComparer)(((IProperty)enumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(enumU64NestedCollection))))))), ((ValueComparer)(((IProperty)enumU8).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU8)), (((IEnumerable)(source.GetCurrentValue(enumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer>)(((IProperty)enumU8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU8Array))))))), ((ValueComparer)(((IProperty)enumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(enumU8AsString)), (((IEnumerable)(source.GetCurrentValue(enumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer>)(((IProperty)enumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(enumU8AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(enumU8AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU8AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(enumU8Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)enumU8Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(enumU8Collection))))))), ((ValueComparer)(((IProperty)@float).GetValueComparer())).Snapshot(source.GetCurrentValue(@float))))); + var entity2 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg2 = ((ISnapshot)(new Snapshot, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList[], sbyte, sbyte[], sbyte[][][], int, int, int?, bool?, bool? [], byte[], byte[][], byte[][][], char?>((((IEnumerable)(source.GetCurrentValue(floatArray))) == null ? null : ((float[])(((ValueComparer>)(((IProperty)floatArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(floatArray))))))), ((ValueComparer)(((IProperty)guid).GetValueComparer())).Snapshot(source.GetCurrentValue(guid)), (((IEnumerable)(source.GetCurrentValue(guidArray))) == null ? null : ((Guid[])(((ValueComparer>)(((IProperty)guidArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(guidArray))))))), (((object)(source.GetCurrentValue>(guidNestedCollection))) == null ? null : ((ICollection)(((ValueComparer)(((IProperty)guidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(guidNestedCollection))))))), ((ValueComparer)(((IProperty)guidToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(guidToBytesConverterProperty)), ((ValueComparer)(((IProperty)guidToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(guidToStringConverterProperty)), (source.GetCurrentValue(iPAddress) == null ? null : ((ValueComparer)(((IProperty)iPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue(iPAddress))), (((object)(source.GetCurrentValue(iPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)iPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(iPAddressArray))))))), (source.GetCurrentValue(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer)(((IProperty)iPAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(iPAddressToBytesConverterProperty))), (source.GetCurrentValue(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer)(((IProperty)iPAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(iPAddressToStringConverterProperty))), ((ValueComparer)(((IProperty)int16).GetValueComparer())).Snapshot(source.GetCurrentValue(int16)), (((IEnumerable)(source.GetCurrentValue(int16Array))) == null ? null : ((short[])(((ValueComparer>)(((IProperty)int16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(int16Array))))))), ((ValueComparer)(((IProperty)int32).GetValueComparer())).Snapshot(source.GetCurrentValue(int32)), (((IEnumerable)(source.GetCurrentValue(int32Array))) == null ? null : ((int[])(((ValueComparer>)(((IProperty)int32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(int32Array))))))), (((object)(source.GetCurrentValue(int32NestedCollection))) == null ? null : ((int[][])(((ValueComparer)(((IProperty)int32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(int32NestedCollection))))))), ((ValueComparer)(((IProperty)int64).GetValueComparer())).Snapshot(source.GetCurrentValue(int64)), (((IEnumerable)(source.GetCurrentValue(int64Array))) == null ? null : ((long[])(((ValueComparer>)(((IProperty)int64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(int64Array))))))), (((object)(source.GetCurrentValue[]>(int64NestedCollection))) == null ? null : ((IList[])(((ValueComparer)(((IProperty)int64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue[]>(int64NestedCollection))))))), ((ValueComparer)(((IProperty)int8).GetValueComparer())).Snapshot(source.GetCurrentValue(int8)), (((IEnumerable)(source.GetCurrentValue(int8Array))) == null ? null : ((sbyte[])(((ValueComparer>)(((IProperty)int8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(int8Array))))))), (((object)(source.GetCurrentValue(int8NestedCollection))) == null ? null : ((sbyte[][][])(((ValueComparer)(((IProperty)int8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(int8NestedCollection))))))), ((ValueComparer)(((IProperty)intNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(intNumberToBytesConverterProperty)), ((ValueComparer)(((IProperty)intNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(intNumberToStringConverterProperty)), (source.GetCurrentValue(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer)(((IProperty)nullIntToNullStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(nullIntToNullStringConverterProperty))), (source.GetCurrentValue(nullableBool) == null ? null : ((ValueComparer)(((IProperty)nullableBool).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableBool))), (((IEnumerable)(source.GetCurrentValue(nullableBoolArray))) == null ? null : ((bool? [])(((ValueComparer>)(((IProperty)nullableBoolArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableBoolArray))))))), (source.GetCurrentValue(nullableBytes) == null ? null : ((ValueComparer)(((IProperty)nullableBytes).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableBytes))), (((object)(source.GetCurrentValue(nullableBytesArray))) == null ? null : ((byte[][])(((ValueComparer)(((IProperty)nullableBytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableBytesArray))))))), (((object)(source.GetCurrentValue(nullableBytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer)(((IProperty)nullableBytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableBytesNestedCollection))))))), (source.GetCurrentValue(nullableChar) == null ? null : ((ValueComparer)(((IProperty)nullableChar).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableChar)))))); + var entity3 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg3 = ((ISnapshot)(new Snapshot, List, CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], List, List, CompiledModelTestBase.Enum32? [][][], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], List, List, CompiledModelTestBase.Enum8?, CompiledModelTestBase.Enum8? []>((((IEnumerable)(source.GetCurrentValue(nullableCharArray))) == null ? null : ((char? [])(((ValueComparer>)(((IProperty)nullableCharArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableCharArray))))))), (source.GetCurrentValue(nullableDateOnly) == null ? null : ((ValueComparer)(((IProperty)nullableDateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableDateOnly))), (((IEnumerable)(source.GetCurrentValue(nullableDateOnlyArray))) == null ? null : ((DateOnly? [])(((ValueComparer>)(((IProperty)nullableDateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableDateOnlyArray))))))), (source.GetCurrentValue(nullableDateTime) == null ? null : ((ValueComparer)(((IProperty)nullableDateTime).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableDateTime))), (((IEnumerable)(source.GetCurrentValue(nullableDateTimeArray))) == null ? null : ((DateTime? [])(((ValueComparer>)(((IProperty)nullableDateTimeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableDateTimeArray))))))), (source.GetCurrentValue(nullableDecimal) == null ? null : ((ValueComparer)(((IProperty)nullableDecimal).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableDecimal))), (((IEnumerable)(source.GetCurrentValue(nullableDecimalArray))) == null ? null : ((decimal? [])(((ValueComparer>)(((IProperty)nullableDecimalArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableDecimalArray))))))), (source.GetCurrentValue(nullableDouble) == null ? null : ((ValueComparer)(((IProperty)nullableDouble).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableDouble))), (((IEnumerable)(source.GetCurrentValue(nullableDoubleArray))) == null ? null : ((double? [])(((ValueComparer>)(((IProperty)nullableDoubleArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableDoubleArray))))))), (source.GetCurrentValue(nullableEnum16) == null ? null : ((ValueComparer)(((IProperty)nullableEnum16).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum16))), (((IEnumerable)(source.GetCurrentValue(nullableEnum16Array))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer>)(((IProperty)nullableEnum16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum16Array))))))), (source.GetCurrentValue(nullableEnum16AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum16AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer>)(((IProperty)nullableEnum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum16AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum16AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum16AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum16Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum16Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum16Collection))))))), (source.GetCurrentValue(nullableEnum32) == null ? null : ((ValueComparer)(((IProperty)nullableEnum32).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum32))), (((IEnumerable)(source.GetCurrentValue(nullableEnum32Array))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer>)(((IProperty)nullableEnum32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum32Array))))))), (source.GetCurrentValue(nullableEnum32AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum32AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer>)(((IProperty)nullableEnum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum32AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum32AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum32AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum32Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum32Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum32Collection))))))), (((object)(source.GetCurrentValue(nullableEnum32NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum32? [][][])(((ValueComparer)(((IProperty)nullableEnum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableEnum32NestedCollection))))))), (source.GetCurrentValue(nullableEnum64) == null ? null : ((ValueComparer)(((IProperty)nullableEnum64).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum64))), (((IEnumerable)(source.GetCurrentValue(nullableEnum64Array))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer>)(((IProperty)nullableEnum64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum64Array))))))), (source.GetCurrentValue(nullableEnum64AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum64AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer>)(((IProperty)nullableEnum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum64AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum64AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum64AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum64Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum64Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum64Collection))))))), (source.GetCurrentValue(nullableEnum8) == null ? null : ((ValueComparer)(((IProperty)nullableEnum8).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum8))), (((IEnumerable)(source.GetCurrentValue(nullableEnum8Array))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer>)(((IProperty)nullableEnum8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum8Array)))))))))); + var entity4 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg4 = ((ISnapshot)(new Snapshot, List, CompiledModelTestBase.Enum8? [][], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], List, 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>((source.GetCurrentValue(nullableEnum8AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnum8AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer>)(((IProperty)nullableEnum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnum8AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum8AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum8AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnum8Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnum8Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnum8Collection))))))), (((object)(source.GetCurrentValue(nullableEnum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8? [][])(((ValueComparer)(((IProperty)nullableEnum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableEnum8NestedCollection))))))), (source.GetCurrentValue(nullableEnumU16) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU16).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU16))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer>)(((IProperty)nullableEnumU16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU16Array))))))), (source.GetCurrentValue(nullableEnumU16AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU16AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer>)(((IProperty)nullableEnumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU16AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU16AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU16AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU16Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU16Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU16Collection))))))), (source.GetCurrentValue(nullableEnumU32) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU32).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU32))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer>)(((IProperty)nullableEnumU32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU32Array))))))), (source.GetCurrentValue(nullableEnumU32AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU32AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer>)(((IProperty)nullableEnumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU32AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU32AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU32AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU32Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU32Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU32Collection))))))), (source.GetCurrentValue(nullableEnumU64) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU64).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU64))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer>)(((IProperty)nullableEnumU64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU64Array))))))), (source.GetCurrentValue(nullableEnumU64AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU64AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer>)(((IProperty)nullableEnumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU64AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU64AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU64AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU64Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU64Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU64Collection))))))), (((object)(source.GetCurrentValue(nullableEnumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64? [][])(((ValueComparer)(((IProperty)nullableEnumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableEnumU64NestedCollection))))))), (source.GetCurrentValue(nullableEnumU8) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU8).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU8))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer>)(((IProperty)nullableEnumU8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU8Array))))))), (source.GetCurrentValue(nullableEnumU8AsString) == null ? null : ((ValueComparer)(((IProperty)nullableEnumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableEnumU8AsString))), (((IEnumerable)(source.GetCurrentValue(nullableEnumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer>)(((IProperty)nullableEnumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableEnumU8AsStringArray))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU8AsStringCollection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU8AsStringCollection))))))), (((IEnumerable)(source.GetCurrentValue>(nullableEnumU8Collection))) == null ? null : ((List)(((ValueComparer>)(((IProperty)nullableEnumU8Collection).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(nullableEnumU8Collection)))))))))); + var entity5 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg5 = ((ISnapshot)(new Snapshot, sbyte?, sbyte? [], PhysicalAddress, PhysicalAddress[], IEnumerable, string, string[], string[][], TimeOnly?, TimeOnly? [], TimeSpan?, TimeSpan? [], ushort?, ushort? [], uint?>((source.GetCurrentValue(nullableFloat) == null ? null : ((ValueComparer)(((IProperty)nullableFloat).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableFloat))), (((IEnumerable)(source.GetCurrentValue(nullableFloatArray))) == null ? null : ((float? [])(((ValueComparer>)(((IProperty)nullableFloatArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableFloatArray))))))), (source.GetCurrentValue(nullableGuid) == null ? null : ((ValueComparer)(((IProperty)nullableGuid).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableGuid))), (((IEnumerable)(source.GetCurrentValue(nullableGuidArray))) == null ? null : ((Guid? [])(((ValueComparer>)(((IProperty)nullableGuidArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableGuidArray))))))), (((object)(source.GetCurrentValue(nullableGuidNestedCollection))) == null ? null : ((Guid? [][])(((ValueComparer)(((IProperty)nullableGuidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableGuidNestedCollection))))))), (source.GetCurrentValue(nullableIPAddress) == null ? null : ((ValueComparer)(((IProperty)nullableIPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableIPAddress))), (((object)(source.GetCurrentValue(nullableIPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)nullableIPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableIPAddressArray))))))), (source.GetCurrentValue(nullableInt16) == null ? null : ((ValueComparer)(((IProperty)nullableInt16).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableInt16))), (((IEnumerable)(source.GetCurrentValue(nullableInt16Array))) == null ? null : ((short? [])(((ValueComparer>)(((IProperty)nullableInt16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableInt16Array))))))), (source.GetCurrentValue(nullableInt32) == null ? null : ((ValueComparer)(((IProperty)nullableInt32).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableInt32))), (((IEnumerable)(source.GetCurrentValue(nullableInt32Array))) == null ? null : ((int? [])(((ValueComparer>)(((IProperty)nullableInt32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableInt32Array))))))), (((object)(source.GetCurrentValue(nullableInt32NestedCollection))) == null ? null : ((int? [][])(((ValueComparer)(((IProperty)nullableInt32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableInt32NestedCollection))))))), (source.GetCurrentValue(nullableInt64) == null ? null : ((ValueComparer)(((IProperty)nullableInt64).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableInt64))), (((IEnumerable)(source.GetCurrentValue(nullableInt64Array))) == null ? null : ((long? [])(((ValueComparer>)(((IProperty)nullableInt64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableInt64Array))))))), (((object)(source.GetCurrentValue>(nullableInt64NestedCollection))) == null ? null : ((List)(((ValueComparer)(((IProperty)nullableInt64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(nullableInt64NestedCollection))))))), (source.GetCurrentValue(nullableInt8) == null ? null : ((ValueComparer)(((IProperty)nullableInt8).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableInt8))), (((IEnumerable)(source.GetCurrentValue(nullableInt8Array))) == null ? null : ((sbyte? [])(((ValueComparer>)(((IProperty)nullableInt8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableInt8Array))))))), (source.GetCurrentValue(nullablePhysicalAddress) == null ? null : ((ValueComparer)(((IProperty)nullablePhysicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue(nullablePhysicalAddress))), (((object)(source.GetCurrentValue(nullablePhysicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer)(((IProperty)nullablePhysicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullablePhysicalAddressArray))))))), (((object)(source.GetCurrentValue>(nullablePhysicalAddressNestedCollection))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(nullablePhysicalAddressNestedCollection))))))), (source.GetCurrentValue(nullableString) == null ? null : ((ValueComparer)(((IProperty)nullableString).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableString))), (((object)(source.GetCurrentValue(nullableStringArray))) == null ? null : ((string[])(((ValueComparer)(((IProperty)nullableStringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableStringArray))))))), (((object)(source.GetCurrentValue(nullableStringNestedCollection))) == null ? null : ((string[][])(((ValueComparer)(((IProperty)nullableStringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableStringNestedCollection))))))), (source.GetCurrentValue(nullableTimeOnly) == null ? null : ((ValueComparer)(((IProperty)nullableTimeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableTimeOnly))), (((IEnumerable)(source.GetCurrentValue(nullableTimeOnlyArray))) == null ? null : ((TimeOnly? [])(((ValueComparer>)(((IProperty)nullableTimeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableTimeOnlyArray))))))), (source.GetCurrentValue(nullableTimeSpan) == null ? null : ((ValueComparer)(((IProperty)nullableTimeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableTimeSpan))), (((IEnumerable)(source.GetCurrentValue(nullableTimeSpanArray))) == null ? null : ((TimeSpan? [])(((ValueComparer>)(((IProperty)nullableTimeSpanArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableTimeSpanArray))))))), (source.GetCurrentValue(nullableUInt16) == null ? null : ((ValueComparer)(((IProperty)nullableUInt16).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableUInt16))), (((IEnumerable)(source.GetCurrentValue(nullableUInt16Array))) == null ? null : ((ushort? [])(((ValueComparer>)(((IProperty)nullableUInt16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableUInt16Array))))))), (source.GetCurrentValue(nullableUInt32) == null ? null : ((ValueComparer)(((IProperty)nullableUInt32).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableUInt32)))))); + var entity6 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg6 = ((ISnapshot)(new Snapshot((((IEnumerable)(source.GetCurrentValue(nullableUInt32Array))) == null ? null : ((uint? [])(((ValueComparer>)(((IProperty)nullableUInt32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableUInt32Array))))))), (source.GetCurrentValue(nullableUInt64) == null ? null : ((ValueComparer)(((IProperty)nullableUInt64).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableUInt64))), (((IEnumerable)(source.GetCurrentValue(nullableUInt64Array))) == null ? null : ((ulong? [])(((ValueComparer>)(((IProperty)nullableUInt64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableUInt64Array))))))), (source.GetCurrentValue(nullableUInt8) == null ? null : ((ValueComparer)(((IProperty)nullableUInt8).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableUInt8))), (((IEnumerable)(source.GetCurrentValue(nullableUInt8Array))) == null ? null : ((byte? [])(((ValueComparer>)(((IProperty)nullableUInt8Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(nullableUInt8Array))))))), (((object)(source.GetCurrentValue(nullableUInt8NestedCollection))) == null ? null : ((byte? [][])(((ValueComparer)(((IProperty)nullableUInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableUInt8NestedCollection))))))), (source.GetCurrentValue(nullableUri) == null ? null : ((ValueComparer)(((IProperty)nullableUri).GetValueComparer())).Snapshot(source.GetCurrentValue(nullableUri))), (((object)(source.GetCurrentValue(nullableUriArray))) == null ? null : ((Uri[])(((ValueComparer)(((IProperty)nullableUriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(nullableUriArray))))))), (source.GetCurrentValue(physicalAddress) == null ? null : ((ValueComparer)(((IProperty)physicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue(physicalAddress))), (((object)(source.GetCurrentValue(physicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer)(((IProperty)physicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(physicalAddressArray))))))), (source.GetCurrentValue(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer)(((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(physicalAddressToBytesConverterProperty))), (source.GetCurrentValue(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer)(((IProperty)physicalAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(physicalAddressToStringConverterProperty))), (source.GetCurrentValue(@string) == null ? null : ((ValueComparer)(((IProperty)@string).GetValueComparer())).Snapshot(source.GetCurrentValue(@string))), (((object)(source.GetCurrentValue(stringArray))) == null ? null : ((string[])(((ValueComparer)(((IProperty)stringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(stringArray))))))), (((object)(source.GetCurrentValue(stringNestedCollection))) == null ? null : ((string[][])(((ValueComparer)(((IProperty)stringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(stringNestedCollection))))))), (source.GetCurrentValue(stringToBoolConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToBoolConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToBoolConverterProperty))), (source.GetCurrentValue(stringToBytesConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToBytesConverterProperty))), (source.GetCurrentValue(stringToCharConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToCharConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToCharConverterProperty))), (source.GetCurrentValue(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToDateOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToDateOnlyConverterProperty))), (source.GetCurrentValue(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToDateTimeConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToDateTimeConverterProperty))), (source.GetCurrentValue(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToDateTimeOffsetConverterProperty))), (source.GetCurrentValue(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToDecimalNumberConverterProperty))), (source.GetCurrentValue(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty))), (source.GetCurrentValue(stringToEnumConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToEnumConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToEnumConverterProperty))), (source.GetCurrentValue(stringToGuidConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToGuidConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToGuidConverterProperty))), (source.GetCurrentValue(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToIntNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToIntNumberConverterProperty))), (source.GetCurrentValue(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToTimeOnlyConverterProperty))), (source.GetCurrentValue(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToTimeSpanConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToTimeSpanConverterProperty))), (source.GetCurrentValue(stringToUriConverterProperty) == null ? null : ((ValueComparer)(((IProperty)stringToUriConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(stringToUriConverterProperty))), ((ValueComparer)(((IProperty)timeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue(timeOnly))))); + 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, string, JObject>((((IEnumerable)(source.GetCurrentValue(timeOnlyArray))) == null ? null : ((TimeOnly[])(((ValueComparer>)(((IProperty)timeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(timeOnlyArray))))))), ((ValueComparer)(((IProperty)timeOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(timeOnlyToStringConverterProperty)), ((ValueComparer)(((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(timeOnlyToTicksConverterProperty)), ((ValueComparer)(((IProperty)timeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue(timeSpan)), (((IEnumerable)(source.GetCurrentValue(timeSpanArray))) == null ? null : ((TimeSpan[])(((ValueComparer>)(((IProperty)timeSpanArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(timeSpanArray))))))), ((ValueComparer)(((IProperty)timeSpanToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(timeSpanToStringConverterProperty)), ((ValueComparer)(((IProperty)timeSpanToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(timeSpanToTicksConverterProperty)), ((ValueComparer)(((IProperty)uInt16).GetValueComparer())).Snapshot(source.GetCurrentValue(uInt16)), (((IEnumerable)(source.GetCurrentValue(uInt16Array))) == null ? null : ((ushort[])(((ValueComparer>)(((IProperty)uInt16Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(uInt16Array))))))), ((ValueComparer)(((IProperty)uInt32).GetValueComparer())).Snapshot(source.GetCurrentValue(uInt32)), (((IEnumerable)(source.GetCurrentValue(uInt32Array))) == null ? null : ((uint[])(((ValueComparer>)(((IProperty)uInt32Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(uInt32Array))))))), ((ValueComparer)(((IProperty)uInt64).GetValueComparer())).Snapshot(source.GetCurrentValue(uInt64)), (((IEnumerable)(source.GetCurrentValue(uInt64Array))) == null ? null : ((ulong[])(((ValueComparer>)(((IProperty)uInt64Array).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(uInt64Array))))))), ((ValueComparer)(((IProperty)uInt8).GetValueComparer())).Snapshot(source.GetCurrentValue(uInt8)), (source.GetCurrentValue(uInt8Array) == null ? null : ((ValueComparer)(((IProperty)uInt8Array).GetValueComparer())).Snapshot(source.GetCurrentValue(uInt8Array))), (((object)(source.GetCurrentValue>(uInt8NestedCollection))) == null ? null : ((List)(((ValueComparer)(((IProperty)uInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(uInt8NestedCollection))))))), (source.GetCurrentValue(uri) == null ? null : ((ValueComparer)(((IProperty)uri).GetValueComparer())).Snapshot(source.GetCurrentValue(uri))), (((object)(source.GetCurrentValue(uriArray))) == null ? null : ((Uri[])(((ValueComparer)(((IProperty)uriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(uriArray))))))), (source.GetCurrentValue(uriToStringConverterProperty) == null ? null : ((ValueComparer)(((IProperty)uriToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue(uriToStringConverterProperty))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))) }))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(CompiledModelTestBase.ManyTypesId)), (default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(CompiledModelTestBase.ManyTypesId), default(JObject))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id)))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 261, + navigationCount: 0, + complexPropertyCount: 0, + originalValueCount: 261, + shadowCount: 3, + relationshipCount: 2, + storeGeneratedCount: 2); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs new file mode 100644 index 00000000000..a7f933eb3fd --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs @@ -0,0 +1,790 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class ManyTypesUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.ManyTypesId Id(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool Bool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool[] BoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool[][] BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[] Bytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[][] BytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[][][] BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[] BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char Char(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char[] CharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char[][] CharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateOnly DateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateOnly[] DateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateOnly DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime DateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime[] DateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal Decimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal[] DecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double Double(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double[] DoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List[][] Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List Enum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[][] Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[][] EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List EnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref float Float(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref float[] FloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid Guid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid[] GuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ICollection GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress IPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress[] IPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref short Int16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref short[] Int16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int Int32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int[] Int32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int[][] Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long Int64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long[] Int64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList[] Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref sbyte Int8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref sbyte[] Int8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref sbyte[][][] Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int? NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool? NullableBool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool?[] NullableBoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[] NullableBytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[][] NullableBytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[][][] NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char? NullableChar(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref char?[] NullableCharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateOnly? NullableDateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateOnly?[] NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime? NullableDateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime?[] NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal? NullableDecimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref decimal?[] NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double? NullableDouble(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref double?[] NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[][][] NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[][] NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[][] NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref float? NullableFloat(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref float?[] NullableFloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid? NullableGuid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid?[] NullableGuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid?[][] NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress NullableIPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress[] NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref short? NullableInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref short?[] NullableInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int? NullableInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int?[] NullableInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int?[][] NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long? NullableInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long?[] NullableInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref sbyte? NullableInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref sbyte?[] NullableInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress[] NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string NullableString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string[] NullableStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string[][] NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly? NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly?[] NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan? NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan?[] NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ushort? NullableUInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ushort?[] NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref uint? NullableUInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref uint?[] NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ulong? NullableUInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ulong?[] NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte? NullableUInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte?[] NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte?[][] NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Uri NullableUri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Uri[] NullableUriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress[] PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string String(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string[] StringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string[][] StringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly TimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly[] TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeOnly TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan TimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan[] TimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TimeSpan TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ushort UInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ushort[] UInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref uint UInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref uint[] UInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ulong UInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ulong[] UInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte UInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref byte[] UInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Uri Uri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Uri[] UriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Uri UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs new file mode 100644 index 00000000000..a2d2acb486d --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs @@ -0,0 +1,881 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class OwnedType0EntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalDerived>.ManyOwned#OwnedType", + typeof(CompiledModelTestBase.OwnedType), + baseEntityType, + sharedClrType: true, + propertyCount: 14, + servicePropertyCount: 1, + foreignKeyCount: 1, + keyCount: 1); + + var principalDerivedId = runtimeEntityType.AddProperty( + "PrincipalDerivedId", + typeof(long), + afterSaveBehavior: PropertySaveBehavior.Throw, + sentinel: 0L); + principalDerivedId.SetAccessors( + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue(0) == 0L ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue(principalDerivedId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalDerivedId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + principalDerivedId.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: 0, + relationshipIndex: 0, + storeGenerationIndex: 0); + principalDerivedId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalDerivedId)); + + var principalDerivedAlternateId = runtimeEntityType.AddProperty( + "PrincipalDerivedAlternateId", + typeof(Guid), + afterSaveBehavior: PropertySaveBehavior.Throw); + principalDerivedAlternateId.SetAccessors( + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(principalDerivedAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalDerivedAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + principalDerivedAlternateId.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: 1, + relationshipIndex: 1, + storeGenerationIndex: 1); + principalDerivedAlternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + principalDerivedAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalDerivedAlternateId)); + principalDerivedAlternateId.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var id = runtimeEntityType.AddProperty( + "Id", + typeof(int), + valueGenerated: ValueGenerated.OnAddOrUpdate, + beforeSaveBehavior: PropertySaveBehavior.Ignore, + afterSaveBehavior: PropertySaveBehavior.Throw, + sentinel: 0); + id.SetAccessors( + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue(2) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue(2) == 0 ? entry.ReadTemporaryValue(2) : entry.ReadShadowValue(2))), + int (InternalEntityEntry entry) => entry.ReadShadowValue(2), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + id.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: 2, + relationshipIndex: 2, + storeGenerationIndex: 2); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); + + var details = runtimeEntityType.AddProperty( + "Details", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Details", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + details.SetGetter( + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); + details.SetSetter( + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); + details.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); + details.SetAccessors( + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(details, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue(details), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + details.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + details.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var number = runtimeEntityType.AddProperty( + "Number", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Number", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0); + number.SetGetter( + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); + number.SetSetter( + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); + number.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); + number.SetAccessors( + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(number, 4), + int (InternalEntityEntry entry) => entry.GetCurrentValue(number), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + number.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + number.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + + var refTypeArray = runtimeEntityType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 5), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + refTypeArray.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = runtimeEntityType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 6), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + refTypeEnumerable.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = runtimeEntityType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 7), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + refTypeIList.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = runtimeEntityType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 8), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); + refTypeList.SetPropertyIndexes( + index: 8, + originalValueIndex: 8, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = runtimeEntityType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 9), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[9]); + valueTypeArray.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = runtimeEntityType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 10), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[10]); + valueTypeEnumerable.SetPropertyIndexes( + index: 10, + originalValueIndex: 10, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = runtimeEntityType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 11), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); + valueTypeIList.SetPropertyIndexes( + index: 11, + originalValueIndex: 11, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = runtimeEntityType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 12), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); + valueTypeList.SetPropertyIndexes( + index: 12, + originalValueIndex: 12, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + nullable: true, + valueGenerated: ValueGenerated.OnAddOrUpdate, + beforeSaveBehavior: PropertySaveBehavior.Ignore, + afterSaveBehavior: PropertySaveBehavior.Ignore); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(13) ? entry.ReadStoreGeneratedValue(3) : (entry.FlaggedAsTemporary(13) && entry.ReadShadowValue(3) == null ? entry.ReadTemporaryValue(3) : entry.ReadShadowValue(3))), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(3), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 13), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[13]); + __jObject.SetPropertyIndexes( + index: 13, + originalValueIndex: 13, + shadowIndex: 3, + relationshipIndex: -1, + storeGenerationIndex: 3); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var context = runtimeEntityType.AddServiceProperty( + "Context", + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Context", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + serviceType: typeof(DbContext)); + context.SetPropertyIndexes( + index: -1, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + + var key = runtimeEntityType.AddKey( + new[] { principalDerivedId, principalDerivedAlternateId, id }); + runtimeEntityType.SetPrimaryKey(key); + + return runtimeEntityType; + } + + public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalDerivedId"), declaringEntityType.FindProperty("PrincipalDerivedAlternateId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id"), principalEntityType.FindProperty("AlternateId") }), + principalEntityType, + deleteBehavior: DeleteBehavior.Cascade, + required: true, + ownership: true); + + var manyOwned = principalEntityType.AddNavigation("ManyOwned", + runtimeForeignKey, + onDependent: false, + typeof(ICollection), + fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived>).GetField("ManyOwned", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + eagerLoaded: true); + + manyOwned.SetGetter( + ICollection (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity), + bool (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity) == null, + ICollection (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.ManyOwned(instance), + bool (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.ManyOwned(instance) == null); + manyOwned.SetSetter( + (CompiledModelTestBase.PrincipalDerived> entity, ICollection value) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity) = value); + manyOwned.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalDerived> entity, ICollection value) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity) = value); + manyOwned.SetAccessors( + ICollection (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.ManyOwned(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + ICollection (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.ManyOwned(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + null, + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(manyOwned), + null); + manyOwned.SetPropertyIndexes( + index: 3, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 6, + storeGenerationIndex: -1); + manyOwned.SetCollectionAccessor>, ICollection, CompiledModelTestBase.OwnedType>( + ICollection (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity), + (CompiledModelTestBase.PrincipalDerived> entity, ICollection collection) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity) = ((ICollection)(collection)), + (CompiledModelTestBase.PrincipalDerived> entity, ICollection collection) => PrincipalDerivedUnsafeAccessors>.ManyOwned(entity) = ((ICollection)(collection)), + ICollection (CompiledModelTestBase.PrincipalDerived> entity, Action>, ICollection> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet>, ICollection, CompiledModelTestBase.OwnedType>(entity, setter), + ICollection () => ((ICollection)(((ICollection)(new HashSet(ReferenceEqualityComparer.Instance)))))); + return runtimeForeignKey; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var principalDerivedId = runtimeEntityType.FindProperty("PrincipalDerivedId")!; + var principalDerivedAlternateId = runtimeEntityType.FindProperty("PrincipalDerivedAlternateId")!; + var id = runtimeEntityType.FindProperty("Id")!; + var details = runtimeEntityType.FindProperty("Details")!; + var number = runtimeEntityType.FindProperty("Number")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var key = runtimeEntityType.FindKey(new[] { principalDerivedId, principalDerivedAlternateId, id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key)); + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, JObject>(((ValueComparer)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)), (default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(int), default(JObject))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("PrincipalDerivedId") ? ((long)(source["PrincipalDerivedId"])) : 0L), (source.ContainsKey("PrincipalDerivedAlternateId") ? ((Guid)(source["PrincipalDerivedAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("Id") ? ((int)(source["Id"])) : 0), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(int), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)(((IProperty)principalDerivedAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 14, + navigationCount: 0, + complexPropertyCount: 0, + originalValueCount: 14, + shadowCount: 4, + relationshipCount: 3, + storeGeneratedCount: 4); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs new file mode 100644 index 00000000000..2c6fe959b7e --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs @@ -0,0 +1,856 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class OwnedTypeEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalBase.Owned#OwnedType", + typeof(CompiledModelTestBase.OwnedType), + baseEntityType, + sharedClrType: true, + changeTrackingStrategy: ChangeTrackingStrategy.ChangingAndChangedNotificationsWithOriginalValues, + propertyCount: 13, + servicePropertyCount: 1, + foreignKeyCount: 1, + keyCount: 1); + + var principalBaseId = runtimeEntityType.AddProperty( + "PrincipalBaseId", + typeof(long), + propertyAccessMode: PropertyAccessMode.Field, + afterSaveBehavior: PropertySaveBehavior.Throw, + sentinel: 0L); + principalBaseId.SetAccessors( + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue(0) == 0L ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue(principalBaseId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalBaseId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + principalBaseId.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: 0, + relationshipIndex: 0, + storeGenerationIndex: 0); + principalBaseId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalBaseId)); + + var principalBaseAlternateId = runtimeEntityType.AddProperty( + "PrincipalBaseAlternateId", + typeof(Guid), + propertyAccessMode: PropertyAccessMode.Field, + afterSaveBehavior: PropertySaveBehavior.Throw); + principalBaseAlternateId.SetAccessors( + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(principalBaseAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalBaseAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + principalBaseAlternateId.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: 1, + relationshipIndex: 1, + storeGenerationIndex: 1); + principalBaseAlternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + principalBaseAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalBaseAlternateId)); + principalBaseAlternateId.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var details = runtimeEntityType.AddProperty( + "Details", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Details", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + details.SetGetter( + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); + details.SetSetter( + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); + details.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); + details.SetAccessors( + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(details, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue(details), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + details.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + details.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var number = runtimeEntityType.AddProperty( + "Number", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Number", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + sentinel: 0); + number.SetGetter( + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); + number.SetSetter( + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); + number.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); + number.SetAccessors( + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(number, 3), + int (InternalEntityEntry entry) => entry.GetCurrentValue(number), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + number.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + number.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + + var refTypeArray = runtimeEntityType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 4), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + refTypeArray.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = runtimeEntityType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 5), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + refTypeEnumerable.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = runtimeEntityType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 6), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + refTypeIList.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = runtimeEntityType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 7), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + refTypeList.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = runtimeEntityType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 8), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); + valueTypeArray.SetPropertyIndexes( + index: 8, + originalValueIndex: 8, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = runtimeEntityType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IEnumerable value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 9), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); + valueTypeEnumerable.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = runtimeEntityType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, IList value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 10), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); + valueTypeIList.SetPropertyIndexes( + index: 10, + originalValueIndex: 10, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = runtimeEntityType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.OwnedType entity, List value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 11), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); + valueTypeList.SetPropertyIndexes( + index: 11, + originalValueIndex: 11, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + propertyAccessMode: PropertyAccessMode.Field, + nullable: true, + valueGenerated: ValueGenerated.OnAddOrUpdate, + beforeSaveBehavior: PropertySaveBehavior.Ignore, + afterSaveBehavior: PropertySaveBehavior.Ignore); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(12) ? entry.ReadStoreGeneratedValue(2) : (entry.FlaggedAsTemporary(12) && entry.ReadShadowValue(2) == null ? entry.ReadTemporaryValue(2) : entry.ReadShadowValue(2))), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(2), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 12), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[12]); + __jObject.SetPropertyIndexes( + index: 12, + originalValueIndex: 12, + shadowIndex: 2, + relationshipIndex: -1, + storeGenerationIndex: 2); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var context = runtimeEntityType.AddServiceProperty( + "Context", + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Context", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + serviceType: typeof(DbContext)); + context.SetPropertyIndexes( + index: -1, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + + var key = runtimeEntityType.AddKey( + new[] { principalBaseId, principalBaseAlternateId }); + runtimeEntityType.SetPrimaryKey(key); + + return runtimeEntityType; + } + + public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalBaseId"), declaringEntityType.FindProperty("PrincipalBaseAlternateId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id"), principalEntityType.FindProperty("AlternateId") }), + principalEntityType, + deleteBehavior: DeleteBehavior.Cascade, + unique: true, + required: true, + requiredDependent: true, + ownership: true); + + var owned = principalEntityType.AddNavigation("Owned", + runtimeForeignKey, + onDependent: false, + typeof(CompiledModelTestBase.OwnedType), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Owned", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("_ownedField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + eagerLoaded: true); + + owned.SetGetter( + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); + owned.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); + owned.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); + owned.SetAccessors( + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + null, + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue(owned), + null); + owned.SetPropertyIndexes( + index: 0, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 3, + storeGenerationIndex: -1); + return runtimeForeignKey; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var principalBaseId = runtimeEntityType.FindProperty("PrincipalBaseId")!; + var principalBaseAlternateId = runtimeEntityType.FindProperty("PrincipalBaseAlternateId")!; + var details = runtimeEntityType.FindProperty("Details")!; + var number = runtimeEntityType.FindProperty("Number")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var key = runtimeEntityType.FindKey(new[] { principalBaseId, principalBaseAlternateId }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key)); + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, JObject>(((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseAlternateId)), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(JObject))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("PrincipalBaseId") ? ((long)(source["PrincipalBaseId"])) : 0L), (source.ContainsKey("PrincipalBaseAlternateId") ? ((Guid)(source["PrincipalBaseAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)(((IProperty)principalBaseAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseAlternateId))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 13, + navigationCount: 0, + complexPropertyCount: 0, + originalValueCount: 13, + shadowCount: 3, + relationshipCount: 2, + storeGeneratedCount: 3); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..ed8d21e397c --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,45 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List _valueTypeList(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs new file mode 100644 index 00000000000..4922f477d23 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs @@ -0,0 +1,1058 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.EntityFrameworkCore.ValueGeneration; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class PrincipalBaseEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalBase", + typeof(CompiledModelTestBase.PrincipalBase), + baseEntityType, + discriminatorProperty: "Discriminator", + discriminatorValue: "PrincipalBase", + derivedTypesCount: 1, + propertyCount: 17, + navigationCount: 1, + skipNavigationCount: 1, + keyCount: 3); + + var id = runtimeEntityType.AddProperty( + "Id", + typeof(long?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + afterSaveBehavior: PropertySaveBehavior.Throw); + id.SetGetter( + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); + id.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); + id.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); + id.SetAccessors( + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + id.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: -1, + relationshipIndex: 0, + storeGenerationIndex: -1); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); + id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); + id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); + + var alternateId = runtimeEntityType.AddProperty( + "AlternateId", + typeof(Guid), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("AlternateId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.FieldDuringConstruction, + afterSaveBehavior: PropertySaveBehavior.Throw, + jsonValueReaderWriter: JsonGuidReaderWriter.Instance); + alternateId.SetGetter( + Guid (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, + bool (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + alternateId.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); + alternateId.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); + alternateId.SetAccessors( + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(alternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(alternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + alternateId.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: -1, + relationshipIndex: 1, + storeGenerationIndex: -1); + alternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: JsonGuidReaderWriter.Instance); + alternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(alternateId)); + alternateId.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var discriminator = runtimeEntityType.AddProperty( + "Discriminator", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); + discriminator.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + discriminator.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: 0, + relationshipIndex: -1, + storeGenerationIndex: -1); + discriminator.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var enum1 = runtimeEntityType.AddProperty( + "Enum1", + typeof(CompiledModelTestBase.AnEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum1.SetGetter( + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); + enum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); + enum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); + enum1.SetAccessors( + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 3), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + enum1.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum1.SetSentinelFromProviderValue(0); + + var enum2 = runtimeEntityType.AddProperty( + "Enum2", + typeof(CompiledModelTestBase.AnEnum?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum2", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + enum2.SetGetter( + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); + enum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); + enum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); + enum2.SetAccessors( + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue(enum2, 4), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + enum2.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum2.SetValueComparer(new NullableValueComparer(enum2.TypeMapping.Comparer)); + enum2.SetKeyValueComparer(new NullableValueComparer(enum2.TypeMapping.KeyComparer)); + + var flagsEnum1 = runtimeEntityType.AddProperty( + "FlagsEnum1", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + flagsEnum1.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); + flagsEnum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); + flagsEnum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); + flagsEnum1.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + flagsEnum1.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum1.SetSentinelFromProviderValue(0); + + var flagsEnum2 = runtimeEntityType.AddProperty( + "FlagsEnum2", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Property); + flagsEnum2.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)))); + flagsEnum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); + flagsEnum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); + flagsEnum2.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 6), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + flagsEnum2.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum2.SetSentinelFromProviderValue(6); + + var refTypeArray = runtimeEntityType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + refTypeArray.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = runtimeEntityType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 8), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); + refTypeEnumerable.SetPropertyIndexes( + index: 8, + originalValueIndex: 8, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = runtimeEntityType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 9), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); + refTypeIList.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = runtimeEntityType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 10), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); + refTypeList.SetPropertyIndexes( + index: 10, + originalValueIndex: 10, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = runtimeEntityType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); + valueTypeArray.SetPropertyIndexes( + index: 11, + originalValueIndex: 11, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = runtimeEntityType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 12), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); + valueTypeEnumerable.SetPropertyIndexes( + index: 12, + originalValueIndex: 12, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = runtimeEntityType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 13), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); + valueTypeIList.SetPropertyIndexes( + index: 13, + originalValueIndex: 13, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = runtimeEntityType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 14), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); + valueTypeList.SetPropertyIndexes( + index: 14, + originalValueIndex: 14, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var __id = runtimeEntityType.AddProperty( + "__id", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new IdValueGeneratorFactory().Create); + __id.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 15), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[15]); + __id.SetPropertyIndexes( + index: 15, + originalValueIndex: 15, + shadowIndex: 1, + relationshipIndex: 2, + storeGenerationIndex: -1); + __id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); + __id.AddAnnotation("Cosmos:PropertyName", "id"); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + nullable: true); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(2), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(2), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 16), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[16]); + __jObject.SetPropertyIndexes( + index: 16, + originalValueIndex: 16, + shadowIndex: 2, + relationshipIndex: -1, + storeGenerationIndex: -1); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var key = runtimeEntityType.AddKey( + new[] { id }); + + var key0 = runtimeEntityType.AddKey( + new[] { __id }); + + var key1 = runtimeEntityType.AddKey( + new[] { id, alternateId }); + runtimeEntityType.SetPrimaryKey(key1); + + return runtimeEntityType; + } + + public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType declaringEntityType, RuntimeEntityType targetEntityType, RuntimeEntityType joinEntityType) + { + var skipNavigation = declaringEntityType.AddSkipNavigation( + "Deriveds", + targetEntityType, + joinEntityType.FindForeignKey( + new[] { joinEntityType.FindProperty("PrincipalsId"), joinEntityType.FindProperty("PrincipalsAlternateId") }, + declaringEntityType.FindKey(new[] { declaringEntityType.FindProperty("Id"), declaringEntityType.FindProperty("AlternateId") }), + declaringEntityType), + true, + false, + typeof(ICollection), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Deriveds", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + + var inverse = targetEntityType.FindSkipNavigation("Principals"); + if (inverse != null) + { + skipNavigation.Inverse = inverse; + inverse.Inverse = skipNavigation; + } + + skipNavigation.SetGetter( + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); + skipNavigation.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); + skipNavigation.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); + skipNavigation.SetAccessors( + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + null, + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(skipNavigation), + null); + skipNavigation.SetPropertyIndexes( + index: 1, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 4, + storeGenerationIndex: -1); + skipNavigation.SetCollectionAccessor, CompiledModelTestBase.PrincipalBase>( + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + ICollection (CompiledModelTestBase.PrincipalBase entity, Action> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection () => ((ICollection)(((ICollection)(new HashSet(ReferenceEqualityComparer.Instance)))))); + return skipNavigation; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var id = runtimeEntityType.FindProperty("Id")!; + var alternateId = runtimeEntityType.FindProperty("AlternateId")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var enum1 = runtimeEntityType.FindProperty("Enum1")!; + var enum2 = runtimeEntityType.FindProperty("Enum2")!; + var flagsEnum1 = runtimeEntityType.FindProperty("FlagsEnum1")!; + var flagsEnum2 = runtimeEntityType.FindProperty("FlagsEnum2")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var key = runtimeEntityType.FindKey(new[] { id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); + var key0 = runtimeEntityType.FindKey(new[] { __id }); + key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key0)); + key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key0)); + var key1 = runtimeEntityType.FindKey(new[] { id, alternateId }); + key1.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key1)); + key1.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key1)); + var owned = runtimeEntityType.FindNavigation("Owned")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, JObject>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => Snapshot.Empty); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), PrincipalBaseUnsafeAccessors._ownedField(entity8), null))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 17, + navigationCount: 2, + complexPropertyCount: 0, + originalValueCount: 17, + shadowCount: 3, + relationshipCount: 5, + storeGeneratedCount: 0); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs new file mode 100644 index 00000000000..c311823f3ac --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs @@ -0,0 +1,587 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.EntityFrameworkCore.ValueGeneration; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class PrincipalBasePrincipalDerivedDependentBasebyteEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "PrincipalBasePrincipalDerived>", + typeof(Dictionary), + baseEntityType, + sharedClrType: true, + discriminatorProperty: "Discriminator", + indexerPropertyInfo: RuntimeEntityType.FindIndexerProperty(typeof(Dictionary)), + propertyBag: true, + discriminatorValue: "PrincipalBasePrincipalDerived>", + propertyCount: 8, + foreignKeyCount: 2, + keyCount: 2); + + var derivedsId = runtimeEntityType.AddProperty( + "DerivedsId", + typeof(long), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw); + derivedsId.SetGetter( + long (Dictionary entity) => ((((IDictionary)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, + long (Dictionary instance) => ((((IDictionary)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); + derivedsId.SetSetter( + (Dictionary entity, long value) => entity["DerivedsId"] = ((object)(value))); + derivedsId.SetMaterializationSetter( + (Dictionary entity, long value) => entity["DerivedsId"] = ((object)(value))); + derivedsId.SetAccessors( + long (InternalEntityEntry entry) => + { + if (entry.FlaggedAsStoreGenerated(0)) + { + return entry.ReadStoreGeneratedValue(0); + } + else + { + { + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary)(entry.Entity))["DerivedsId"] : null) == null) + { + return entry.ReadTemporaryValue(0); + } + else + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); + } + } + } + }, + long (InternalEntityEntry entry) => + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); + }, + long (InternalEntityEntry entry) => entry.ReadOriginalValue(derivedsId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(derivedsId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + derivedsId.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: -1, + relationshipIndex: 0, + storeGenerationIndex: 0); + derivedsId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + derivedsId.SetCurrentValueComparer(new EntryCurrentValueComparer(derivedsId)); + + var derivedsAlternateId = runtimeEntityType.AddProperty( + "DerivedsAlternateId", + typeof(Guid), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw); + derivedsAlternateId.SetGetter( + Guid (Dictionary entity) => ((((IDictionary)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, + Guid (Dictionary instance) => ((((IDictionary)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); + derivedsAlternateId.SetSetter( + (Dictionary entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); + derivedsAlternateId.SetMaterializationSetter( + (Dictionary entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); + derivedsAlternateId.SetAccessors( + Guid (InternalEntityEntry entry) => + { + if (entry.FlaggedAsStoreGenerated(1)) + { + return entry.ReadStoreGeneratedValue(1); + } + else + { + { + if (entry.FlaggedAsTemporary(1) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary)(entry.Entity))["DerivedsAlternateId"] : null) == null) + { + return entry.ReadTemporaryValue(1); + } + else + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); + } + } + } + }, + Guid (InternalEntityEntry entry) => + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); + }, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(derivedsAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(derivedsAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + derivedsAlternateId.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: -1, + relationshipIndex: 1, + storeGenerationIndex: 1); + derivedsAlternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + derivedsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(derivedsAlternateId)); + + var principalsId = runtimeEntityType.AddProperty( + "PrincipalsId", + typeof(long), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw); + principalsId.SetGetter( + long (Dictionary entity) => ((((IDictionary)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, + long (Dictionary instance) => ((((IDictionary)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); + principalsId.SetSetter( + (Dictionary entity, long value) => entity["PrincipalsId"] = ((object)(value))); + principalsId.SetMaterializationSetter( + (Dictionary entity, long value) => entity["PrincipalsId"] = ((object)(value))); + principalsId.SetAccessors( + long (InternalEntityEntry entry) => + { + if (entry.FlaggedAsStoreGenerated(2)) + { + return entry.ReadStoreGeneratedValue(2); + } + else + { + { + if (entry.FlaggedAsTemporary(2) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary)(entry.Entity))["PrincipalsId"] : null) == null) + { + return entry.ReadTemporaryValue(2); + } + else + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); + } + } + } + }, + long (InternalEntityEntry entry) => + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); + }, + long (InternalEntityEntry entry) => entry.ReadOriginalValue(principalsId, 2), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalsId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + principalsId.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: -1, + relationshipIndex: 2, + storeGenerationIndex: 2); + principalsId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + principalsId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalsId)); + + var principalsAlternateId = runtimeEntityType.AddProperty( + "PrincipalsAlternateId", + typeof(Guid), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw); + principalsAlternateId.SetGetter( + Guid (Dictionary entity) => ((((IDictionary)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, + Guid (Dictionary instance) => ((((IDictionary)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); + principalsAlternateId.SetSetter( + (Dictionary entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); + principalsAlternateId.SetMaterializationSetter( + (Dictionary entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); + principalsAlternateId.SetAccessors( + Guid (InternalEntityEntry entry) => + { + if (entry.FlaggedAsStoreGenerated(3)) + { + return entry.ReadStoreGeneratedValue(3); + } + else + { + { + if (entry.FlaggedAsTemporary(3) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary)(entry.Entity))["PrincipalsAlternateId"] : null) == null) + { + return entry.ReadTemporaryValue(3); + } + else + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); + } + } + } + }, + Guid (InternalEntityEntry entry) => + { + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); + }, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(principalsAlternateId, 3), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalsAlternateId, 3), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + principalsAlternateId.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: 3, + storeGenerationIndex: 3); + principalsAlternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + principalsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalsAlternateId)); + + var discriminator = runtimeEntityType.AddProperty( + "Discriminator", + typeof(string), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); + discriminator.SetGetter( + string (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Discriminator") ? entity["Discriminator"] : null) == null ? null : ((string)((((IDictionary)entity).ContainsKey("Discriminator") ? entity["Discriminator"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Discriminator") ? entity["Discriminator"] : null) == null, + string (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Discriminator") ? instance["Discriminator"] : null) == null ? null : ((string)((((IDictionary)instance).ContainsKey("Discriminator") ? instance["Discriminator"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Discriminator") ? instance["Discriminator"] : null) == null); + discriminator.SetSetter( + (Dictionary entity, string value) => entity["Discriminator"] = ((object)(value))); + discriminator.SetMaterializationSetter( + (Dictionary entity, string value) => entity["Discriminator"] = ((object)(value))); + discriminator.SetAccessors( + string (InternalEntityEntry entry) => ((string)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Discriminator") ? ((Dictionary)(entry.Entity))["Discriminator"] : null))), + string (InternalEntityEntry entry) => ((string)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Discriminator") ? ((Dictionary)(entry.Entity))["Discriminator"] : null))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + discriminator.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + discriminator.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var __id = runtimeEntityType.AddProperty( + "__id", + typeof(string), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new IdValueGeneratorFactory().Create); + __id.SetGetter( + string (Dictionary entity) => ((((IDictionary)entity).ContainsKey("__id") ? entity["__id"] : null) == null ? null : ((string)((((IDictionary)entity).ContainsKey("__id") ? entity["__id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("__id") ? entity["__id"] : null) == null, + string (Dictionary instance) => ((((IDictionary)instance).ContainsKey("__id") ? instance["__id"] : null) == null ? null : ((string)((((IDictionary)instance).ContainsKey("__id") ? instance["__id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("__id") ? instance["__id"] : null) == null); + __id.SetSetter( + (Dictionary entity, string value) => entity["__id"] = ((object)(value))); + __id.SetMaterializationSetter( + (Dictionary entity, string value) => entity["__id"] = ((object)(value))); + __id.SetAccessors( + string (InternalEntityEntry entry) => ((string)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("__id") ? ((Dictionary)(entry.Entity))["__id"] : null))), + string (InternalEntityEntry entry) => ((string)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("__id") ? ((Dictionary)(entry.Entity))["__id"] : null))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 5), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 4), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + __id.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: 4, + storeGenerationIndex: -1); + __id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); + __id.AddAnnotation("Cosmos:PropertyName", "id"); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + nullable: true, + valueGenerated: ValueGenerated.OnAddOrUpdate, + beforeSaveBehavior: PropertySaveBehavior.Ignore, + afterSaveBehavior: PropertySaveBehavior.Ignore); + __jObject.SetGetter( + JObject (Dictionary entity) => ((((IDictionary)entity).ContainsKey("__jObject") ? entity["__jObject"] : null) == null ? null : ((JObject)((((IDictionary)entity).ContainsKey("__jObject") ? entity["__jObject"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("__jObject") ? entity["__jObject"] : null) == null, + JObject (Dictionary instance) => ((((IDictionary)instance).ContainsKey("__jObject") ? instance["__jObject"] : null) == null ? null : ((JObject)((((IDictionary)instance).ContainsKey("__jObject") ? instance["__jObject"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("__jObject") ? instance["__jObject"] : null) == null); + __jObject.SetSetter( + (Dictionary entity, JObject value) => entity["__jObject"] = ((object)(value))); + __jObject.SetMaterializationSetter( + (Dictionary entity, JObject value) => entity["__jObject"] = ((object)(value))); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue(4) : (entry.FlaggedAsTemporary(6) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("__jObject") ? ((Dictionary)(entry.Entity))["__jObject"] : null) == null ? entry.ReadTemporaryValue(4) : ((JObject)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("__jObject") ? ((Dictionary)(entry.Entity))["__jObject"] : null))))), + JObject (InternalEntityEntry entry) => ((JObject)((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("__jObject") ? ((Dictionary)(entry.Entity))["__jObject"] : null))), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 6), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + __jObject.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: 4); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + var rowid = runtimeEntityType.AddProperty( + "rowid", + typeof(byte[]), + propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), + nullable: true); + rowid.SetGetter( + byte[] (Dictionary entity) => ((((IDictionary)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : ((byte[])((((IDictionary)entity).ContainsKey("rowid") ? entity["rowid"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, + byte[] (Dictionary instance) => ((((IDictionary)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : ((byte[])((((IDictionary)instance).ContainsKey("rowid") ? instance["rowid"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); + rowid.SetSetter( + (Dictionary entity, byte[] value) => entity["rowid"] = ((object)(value))); + rowid.SetMaterializationSetter( + (Dictionary entity, byte[] value) => entity["rowid"] = ((object)(value))); + rowid.SetAccessors( + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue(rowid, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue(rowid), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + rowid.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + rowid.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), + keyComparer: new ValueComparer( + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); + + var key = runtimeEntityType.AddKey( + new[] { __id }); + + var key0 = runtimeEntityType.AddKey( + new[] { derivedsId, derivedsAlternateId, principalsId, principalsAlternateId }); + runtimeEntityType.SetPrimaryKey(key0); + + return runtimeEntityType; + } + + public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("DerivedsId"), declaringEntityType.FindProperty("DerivedsAlternateId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id"), principalEntityType.FindProperty("AlternateId") }), + principalEntityType, + deleteBehavior: DeleteBehavior.Cascade, + required: true); + + return runtimeForeignKey; + } + + public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalsId"), declaringEntityType.FindProperty("PrincipalsAlternateId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id"), principalEntityType.FindProperty("AlternateId") }), + principalEntityType, + deleteBehavior: DeleteBehavior.Cascade, + required: true); + + return runtimeForeignKey; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var derivedsId = runtimeEntityType.FindProperty("DerivedsId")!; + var derivedsAlternateId = runtimeEntityType.FindProperty("DerivedsAlternateId")!; + var principalsId = runtimeEntityType.FindProperty("PrincipalsId")!; + var principalsAlternateId = runtimeEntityType.FindProperty("PrincipalsAlternateId")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var rowid = runtimeEntityType.FindProperty("rowid")!; + var key = runtimeEntityType.FindKey(new[] { __id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); + var key0 = runtimeEntityType.FindKey(new[] { derivedsId, derivedsAlternateId, principalsId, principalsAlternateId }); + key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key0)); + key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory>(key0)); + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)derivedsId).GetValueComparer())).Snapshot(source.GetCurrentValue(derivedsId)), ((ValueComparer)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(derivedsAlternateId)), ((ValueComparer)(((IProperty)principalsId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalsId)), ((ValueComparer)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalsAlternateId)), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject))), (source.GetCurrentValue(rowid) == null ? null : ((ValueComparer)(((IProperty)rowid).GetValueComparer())).Snapshot(source.GetCurrentValue(rowid)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)derivedsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer)(((IProperty)principalsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long), default(Guid), default(long), default(Guid), default(JObject))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => Snapshot.Empty); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => Snapshot.Empty); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)derivedsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(derivedsId)), ((ValueComparer)(((IProperty)derivedsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(derivedsAlternateId)), ((ValueComparer)(((IProperty)principalsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalsId)), ((ValueComparer)(((IProperty)principalsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalsAlternateId)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id)))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 8, + navigationCount: 0, + complexPropertyCount: 0, + originalValueCount: 8, + shadowCount: 0, + relationshipCount: 5, + storeGeneratedCount: 5); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..4b43c6dd1f6 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,63 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] + public static extern CompiledModelTestBase.AFlagsEnum Get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] + public static extern void Set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ICollection Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs new file mode 100644 index 00000000000..4df04608e96 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs @@ -0,0 +1,145 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class PrincipalDerivedEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalDerived>", + typeof(CompiledModelTestBase.PrincipalDerived>), + baseEntityType, + discriminatorProperty: "Discriminator", + discriminatorValue: "PrincipalDerived", + propertyCount: 0, + navigationCount: 2, + skipNavigationCount: 1); + + return runtimeEntityType; + } + + public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType declaringEntityType, RuntimeEntityType targetEntityType, RuntimeEntityType joinEntityType) + { + var skipNavigation = declaringEntityType.AddSkipNavigation( + "Principals", + targetEntityType, + joinEntityType.FindForeignKey( + new[] { joinEntityType.FindProperty("DerivedsId"), joinEntityType.FindProperty("DerivedsAlternateId") }, + declaringEntityType.FindKey(new[] { declaringEntityType.FindProperty("Id"), declaringEntityType.FindProperty("AlternateId") }), + declaringEntityType), + true, + false, + typeof(ICollection), + propertyInfo: typeof(CompiledModelTestBase.PrincipalDerived>).GetProperty("Principals", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived>).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + + var inverse = targetEntityType.FindSkipNavigation("Deriveds"); + if (inverse != null) + { + skipNavigation.Inverse = inverse; + inverse.Inverse = skipNavigation; + } + + skipNavigation.SetGetter( + ICollection (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.Principals(entity) == null, + ICollection (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived> instance) => PrincipalDerivedUnsafeAccessors>.Principals(instance) == null); + skipNavigation.SetSetter( + (CompiledModelTestBase.PrincipalDerived> entity, ICollection value) => PrincipalDerivedUnsafeAccessors>.Principals(entity) = value); + skipNavigation.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalDerived> entity, ICollection value) => PrincipalDerivedUnsafeAccessors>.Principals(entity) = value); + skipNavigation.SetAccessors( + ICollection (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.Principals(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + ICollection (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors>.Principals(((CompiledModelTestBase.PrincipalDerived>)(entry.Entity))), + null, + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(skipNavigation), + null); + skipNavigation.SetPropertyIndexes( + index: 4, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 7, + storeGenerationIndex: -1); + skipNavigation.SetCollectionAccessor>, ICollection, CompiledModelTestBase.PrincipalBase>( + ICollection (CompiledModelTestBase.PrincipalDerived> entity) => PrincipalDerivedUnsafeAccessors>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived> entity, ICollection collection) => PrincipalDerivedUnsafeAccessors>.Principals(entity) = ((ICollection)(collection)), + (CompiledModelTestBase.PrincipalDerived> entity, ICollection collection) => PrincipalDerivedUnsafeAccessors>.Principals(entity) = ((ICollection)(collection)), + ICollection (CompiledModelTestBase.PrincipalDerived> entity, Action>, ICollection> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet>, ICollection, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection () => ((ICollection)(((ICollection)(new HashSet(ReferenceEqualityComparer.Instance)))))); + return skipNavigation; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var id = runtimeEntityType.FindProperty("Id")!; + var alternateId = runtimeEntityType.FindProperty("AlternateId")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var enum1 = runtimeEntityType.FindProperty("Enum1")!; + var enum2 = runtimeEntityType.FindProperty("Enum2")!; + var flagsEnum1 = runtimeEntityType.FindProperty("FlagsEnum1")!; + var flagsEnum2 = runtimeEntityType.FindProperty("FlagsEnum2")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var owned = runtimeEntityType.FindNavigation("Owned")!; + var dependent = runtimeEntityType.FindNavigation("Dependent")!; + var manyOwned = runtimeEntityType.FindNavigation("ManyOwned")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, JObject>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => Snapshot.Empty); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity8 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), PrincipalBaseUnsafeAccessors._ownedField(entity8), null, PrincipalDerivedUnsafeAccessors>.Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors>.ManyOwned(entity8)), null))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 17, + navigationCount: 5, + complexPropertyCount: 0, + originalValueCount: 17, + shadowCount: 3, + relationshipCount: 8, + storeGeneratedCount: 0); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..924e4c82620 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,23 @@ +// +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] + public static extern ref ICollection ManyOwned(CompiledModelTestBase.PrincipalDerived @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ICollection Principals(CompiledModelTestBase.PrincipalDerived @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextAssemblyAttributes.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextAssemblyAttributes.cs new file mode 100644 index 00000000000..c224873f6fa --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextAssemblyAttributes.cs @@ -0,0 +1,9 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using TestNamespace; + +#pragma warning disable 219, 612, 618 +#nullable disable + +[assembly: DbContextModel(typeof(DbContext), typeof(DbContextModel))] diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModel.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModel.cs new file mode 100644 index 00000000000..583ee4d90cc --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModel.cs @@ -0,0 +1,48 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [DbContext(typeof(DbContext))] + public partial class DbContextModel : RuntimeModel + { + private static readonly bool _useOldBehavior31751 = + System.AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue31751", out var enabled31751) && enabled31751; + + static DbContextModel() + { + var model = new DbContextModel(); + + if (_useOldBehavior31751) + { + model.Initialize(); + } + else + { + var thread = new System.Threading.Thread(RunInitialization, 10 * 1024 * 1024); + thread.Start(); + thread.Join(); + + void RunInitialization() + { + model.Initialize(); + } + } + + model.Customize(); + _instance = (DbContextModel)model.FinalizeModel(); + } + + private static DbContextModel _instance; + public static IModel Instance => _instance; + + partial void Initialize(); + + partial void Customize(); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModelBuilder.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModelBuilder.cs new file mode 100644 index 00000000000..8424384ac48 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModelBuilder.cs @@ -0,0 +1,31 @@ +// +using System; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public partial class DbContextModel + { + private DbContextModel() + : base(skipDetectChanges: false, modelId: new Guid("00000000-0000-0000-0000-000000000000"), entityTypeCount: 2) + { + } + + partial void Initialize() + { + var principalBase = PrincipalBaseEntityType.Create(this); + var principalDerived = PrincipalDerivedEntityType.Create(this, principalBase); + + PrincipalBaseEntityType.CreateForeignKey1(principalBase, principalBase); + + PrincipalBaseEntityType.CreateAnnotations(principalBase); + PrincipalDerivedEntityType.CreateAnnotations(principalDerived); + + AddAnnotation("Cosmos:ContainerName", "DbContext"); + } + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..9bbed4ed29f --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,48 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List _valueTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalBase Principal(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs new file mode 100644 index 00000000000..5cf9423859d --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs @@ -0,0 +1,2739 @@ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; +using Microsoft.EntityFrameworkCore.Cosmos.ValueGeneration.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Json; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Microsoft.EntityFrameworkCore.ValueGeneration; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class PrincipalBaseEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalBase", + typeof(CompiledModelTestBase.PrincipalBase), + baseEntityType, + discriminatorProperty: "Discriminator", + discriminatorValue: "PrincipalBase", + derivedTypesCount: 1, + propertyCount: 17, + complexPropertyCount: 1, + navigationCount: 1, + foreignKeyCount: 1, + keyCount: 2); + + var id = runtimeEntityType.AddProperty( + "Id", + typeof(long?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + afterSaveBehavior: PropertySaveBehavior.Throw); + id.SetGetter( + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); + id.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); + id.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); + id.SetAccessors( + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); + id.SetPropertyIndexes( + index: 0, + originalValueIndex: 0, + shadowIndex: -1, + relationshipIndex: 0, + storeGenerationIndex: -1); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); + id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); + id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); + + var discriminator = runtimeEntityType.AddProperty( + "Discriminator", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); + discriminator.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[1]); + discriminator.SetPropertyIndexes( + index: 1, + originalValueIndex: 1, + shadowIndex: 0, + relationshipIndex: -1, + storeGenerationIndex: -1); + discriminator.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + + var enum1 = runtimeEntityType.AddProperty( + "Enum1", + typeof(CompiledModelTestBase.AnEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum1.SetGetter( + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); + enum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); + enum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); + enum1.SetAccessors( + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); + enum1.SetPropertyIndexes( + index: 2, + originalValueIndex: 2, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum1.SetSentinelFromProviderValue(0); + + var enum2 = runtimeEntityType.AddProperty( + "Enum2", + typeof(CompiledModelTestBase.AnEnum?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum2", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + enum2.SetGetter( + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); + enum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); + enum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); + enum2.SetAccessors( + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); + enum2.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum2.SetValueComparer(new NullableValueComparer(enum2.TypeMapping.Comparer)); + enum2.SetKeyValueComparer(new NullableValueComparer(enum2.TypeMapping.KeyComparer)); + + var flagsEnum1 = runtimeEntityType.AddProperty( + "FlagsEnum1", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + flagsEnum1.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); + flagsEnum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); + flagsEnum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); + flagsEnum1.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); + flagsEnum1.SetPropertyIndexes( + index: 4, + originalValueIndex: 4, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum1.SetSentinelFromProviderValue(0); + + var flagsEnum2 = runtimeEntityType.AddProperty( + "FlagsEnum2", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + flagsEnum2.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); + flagsEnum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); + flagsEnum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); + flagsEnum2.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[5]); + flagsEnum2.SetPropertyIndexes( + index: 5, + originalValueIndex: 5, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum2.SetSentinelFromProviderValue(0); + + var principalBaseId = runtimeEntityType.AddProperty( + "PrincipalBaseId", + typeof(long?), + nullable: true); + principalBaseId.SetAccessors( + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(6) && !(entry.ReadShadowValue(1).HasValue) ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(1))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue(1), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(principalBaseId, 6), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalBaseId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[6]); + principalBaseId.SetPropertyIndexes( + index: 6, + originalValueIndex: 6, + shadowIndex: 1, + relationshipIndex: 1, + storeGenerationIndex: 0); + principalBaseId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + principalBaseId.SetValueComparer(new NullableValueComparer(principalBaseId.TypeMapping.Comparer)); + principalBaseId.SetKeyValueComparer(new NullableValueComparer(principalBaseId.TypeMapping.KeyComparer)); + principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer(principalBaseId)); + + var refTypeArray = runtimeEntityType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); + refTypeArray.SetPropertyIndexes( + index: 7, + originalValueIndex: 7, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = runtimeEntityType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 8), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); + refTypeEnumerable.SetPropertyIndexes( + index: 8, + originalValueIndex: 8, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = runtimeEntityType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 9), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); + refTypeIList.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = runtimeEntityType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 10), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); + refTypeList.SetPropertyIndexes( + index: 10, + originalValueIndex: 10, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = runtimeEntityType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); + valueTypeArray.SetPropertyIndexes( + index: 11, + originalValueIndex: 11, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = runtimeEntityType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 12), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); + valueTypeEnumerable.SetPropertyIndexes( + index: 12, + originalValueIndex: 12, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = runtimeEntityType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 13), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); + valueTypeIList.SetPropertyIndexes( + index: 13, + originalValueIndex: 13, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = runtimeEntityType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 14), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); + valueTypeList.SetPropertyIndexes( + index: 14, + originalValueIndex: 14, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + var __id = runtimeEntityType.AddProperty( + "__id", + typeof(string), + afterSaveBehavior: PropertySaveBehavior.Throw, + valueGeneratorFactory: new IdValueGeneratorFactory().Create); + __id.SetAccessors( + string (InternalEntityEntry entry) => entry.ReadShadowValue(2), + string (InternalEntityEntry entry) => entry.ReadShadowValue(2), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 15), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[15]); + __id.SetPropertyIndexes( + index: 15, + originalValueIndex: 15, + shadowIndex: 2, + relationshipIndex: 2, + storeGenerationIndex: -1); + __id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); + __id.AddAnnotation("Cosmos:PropertyName", "id"); + + var __jObject = runtimeEntityType.AddProperty( + "__jObject", + typeof(JObject), + nullable: true); + __jObject.SetAccessors( + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(3), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(3), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 16), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[16]); + __jObject.SetPropertyIndexes( + index: 16, + originalValueIndex: 16, + shadowIndex: 3, + relationshipIndex: -1, + storeGenerationIndex: -1); + __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + keyComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + providerValueComparer: new ValueComparer( + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), + clrType: typeof(JObject)); + __jObject.AddAnnotation("Cosmos:PropertyName", ""); + + OwnedComplexProperty.Create(runtimeEntityType); + var key = runtimeEntityType.AddKey( + new[] { id }); + runtimeEntityType.SetPrimaryKey(key); + + var key0 = runtimeEntityType.AddKey( + new[] { __id }); + + return runtimeEntityType; + } + + public static class OwnedComplexProperty + { + public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) + { + var complexProperty = declaringType.AddComplexProperty("Owned", + typeof(CompiledModelTestBase.OwnedType), + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalBase.Owned#OwnedType", + typeof(CompiledModelTestBase.OwnedType), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Owned", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("_ownedField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.Field, + changeTrackingStrategy: ChangeTrackingStrategy.ChangingAndChangedNotificationsWithOriginalValues, + propertyCount: 10, + complexPropertyCount: 1); + + var complexType = complexProperty.ComplexType; + complexProperty.SetGetter( + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); + complexProperty.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); + complexProperty.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); + complexProperty.SetAccessors( + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + null, + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), + null); + complexProperty.SetPropertyIndexes( + index: 0, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + var details = complexType.AddProperty( + "Details", + typeof(string), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Details", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyAccessMode: PropertyAccessMode.FieldDuringConstruction, + nullable: true, + maxLength: 64, + unicode: false, + precision: 3, + scale: 2, + sentinel: ""); + details.SetGetter( + string (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details), + bool (CompiledModelTestBase.PrincipalBase entity) => !((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == null) && (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == "", + string (CompiledModelTestBase.OwnedType instance) => instance.Details, + bool (CompiledModelTestBase.OwnedType instance) => !(instance.Details == null) && instance.Details == ""); + details.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, string value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + level1.Details = value; + }); + details.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, string value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + level1.Details = value; + }); + details.SetAccessors( + string (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details), + string (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(details, 17), + string (InternalEntityEntry entry) => entry.GetCurrentValue(details), + object (ValueBuffer valueBuffer) => valueBuffer[17]); + details.SetPropertyIndexes( + index: 17, + originalValueIndex: 17, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + details.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance); + details.AddAnnotation("foo", "bar"); + + var number = complexType.AddProperty( + "Number", + typeof(int), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Number", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + sentinel: 0); + number.SetGetter( + int (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); + number.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, int value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; + }); + number.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, int value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; + }); + number.SetAccessors( + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(number, 18), + int (InternalEntityEntry entry) => entry.GetCurrentValue(number), + object (ValueBuffer valueBuffer) => valueBuffer[18]); + number.SetPropertyIndexes( + index: 18, + originalValueIndex: 18, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + number.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + keyComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + clrType: typeof(int), + jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); + + var refTypeArray = complexType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; + }); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; + }); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 19), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[19]); + refTypeArray.SetPropertyIndexes( + index: 19, + originalValueIndex: 19, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = complexType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; + }); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; + }); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 20), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[20]); + refTypeEnumerable.SetPropertyIndexes( + index: 20, + originalValueIndex: 20, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = complexType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; + }); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; + }); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 21), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[21]); + refTypeIList.SetPropertyIndexes( + index: 21, + originalValueIndex: 21, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = complexType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; + }); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; + }); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 22), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[22]); + refTypeList.SetPropertyIndexes( + index: 22, + originalValueIndex: 22, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = complexType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; + }); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; + }); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 23), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[23]); + valueTypeArray.SetPropertyIndexes( + index: 23, + originalValueIndex: 23, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = complexType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; + }); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; + }); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 24), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[24]); + valueTypeEnumerable.SetPropertyIndexes( + index: 24, + originalValueIndex: 24, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = complexType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; + }); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; + }); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 25), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[25]); + valueTypeIList.SetPropertyIndexes( + index: 25, + originalValueIndex: 25, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = complexType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; + }); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; + }); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 26), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[26]); + valueTypeList.SetPropertyIndexes( + index: 26, + originalValueIndex: 26, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + PrincipalComplexProperty.Create(complexType); + complexType.AddAnnotation("go", "brr"); + complexProperty.AddAnnotation("goo", "ber"); + return complexProperty; + } + + public static class PrincipalComplexProperty + { + public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) + { + var complexProperty = declaringType.AddComplexProperty("Principal", + typeof(CompiledModelTestBase.PrincipalBase), + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalBase.Owned#OwnedType.Principal#PrincipalBase", + typeof(CompiledModelTestBase.PrincipalBase), + propertyInfo: typeof(CompiledModelTestBase.OwnedType).GetProperty("Principal", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + propertyCount: 14); + + var complexType = complexProperty.ComplexType; + complexProperty.SetGetter( + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance) == null); + complexProperty.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; + }); + complexProperty.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; + }); + complexProperty.SetAccessors( + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + null, + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), + null); + complexProperty.SetPropertyIndexes( + index: 1, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + var alternateId = complexType.AddProperty( + "AlternateId", + typeof(Guid), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("AlternateId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + alternateId.SetGetter( + Guid (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + alternateId.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, Guid value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + level2.AlternateId = value; + }); + alternateId.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, Guid value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + level2.AlternateId = value; + }); + alternateId.SetAccessors( + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(alternateId, 27), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue(alternateId), + object (ValueBuffer valueBuffer) => valueBuffer[27]); + alternateId.SetPropertyIndexes( + index: 27, + originalValueIndex: 27, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + alternateId.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + keyComparer: new ValueComparer( + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); + alternateId.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); + + var enum1 = complexType.AddProperty( + "Enum1", + typeof(CompiledModelTestBase.AnEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum1.SetGetter( + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); + enum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; + }); + enum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; + }); + enum1.SetAccessors( + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 28), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[28]); + enum1.SetPropertyIndexes( + index: 28, + originalValueIndex: 28, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum1.SetSentinelFromProviderValue(0); + + var enum2 = complexType.AddProperty( + "Enum2", + typeof(CompiledModelTestBase.AnEnum?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum2", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + enum2.SetGetter( + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); + enum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); + }); + enum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); + }); + enum2.SetAccessors( + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue(enum2, 29), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[29]); + enum2.SetPropertyIndexes( + index: 29, + originalValueIndex: 29, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); + enum2.SetValueComparer(new NullableValueComparer(enum2.TypeMapping.Comparer)); + enum2.SetKeyValueComparer(new NullableValueComparer(enum2.TypeMapping.KeyComparer)); + + var flagsEnum1 = complexType.AddProperty( + "FlagsEnum1", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + flagsEnum1.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); + flagsEnum1.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; + }); + flagsEnum1.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; + }); + flagsEnum1.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 30), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[30]); + flagsEnum1.SetPropertyIndexes( + index: 30, + originalValueIndex: 30, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum1.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum1.SetSentinelFromProviderValue(0); + + var flagsEnum2 = complexType.AddProperty( + "FlagsEnum2", + typeof(CompiledModelTestBase.AFlagsEnum), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + flagsEnum2.SetGetter( + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); + flagsEnum2.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; + }); + flagsEnum2.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; + }); + flagsEnum2.SetAccessors( + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 31), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[31]); + flagsEnum2.SetPropertyIndexes( + index: 31, + originalValueIndex: 31, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + flagsEnum2.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + keyComparer: new ValueComparer( + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), + providerValueComparer: new ValueComparer( + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), + converter: new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); + flagsEnum2.SetSentinelFromProviderValue(0); + + var id = complexType.AddProperty( + "Id", + typeof(long?), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + id.SetGetter( + long? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); + id.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; + }); + id.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, long? value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; + }); + id.SetAccessors( + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 32), + long? (InternalEntityEntry entry) => entry.GetCurrentValue(id), + object (ValueBuffer valueBuffer) => valueBuffer[32]); + id.SetPropertyIndexes( + index: 32, + originalValueIndex: 32, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + id.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + keyComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + providerValueComparer: new ValueComparer( + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), + clrType: typeof(long), + jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); + id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); + id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); + + var refTypeArray = complexType.AddProperty( + "RefTypeArray", + typeof(IPAddress[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeArray.SetGetter( + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); + refTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; + }); + refTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; + }); + refTypeArray.SetAccessors( + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 33), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[33]); + refTypeArray.SetPropertyIndexes( + index: 33, + originalValueIndex: 33, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (IPAddress[] v1, IPAddress[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (IPAddress[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + IPAddress[] (IPAddress[] source) => source.ToArray()), + clrType: typeof(IPAddress[]), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var refTypeEnumerable = complexType.AddProperty( + "RefTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); + refTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; + }); + refTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; + }); + refTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 34), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[34]); + refTypeEnumerable.SetPropertyIndexes( + index: 34, + originalValueIndex: 34, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeIList = complexType.AddProperty( + "RefTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); + refTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; + }); + refTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; + }); + refTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 35), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[35]); + refTypeIList.SetPropertyIndexes( + index: 35, + originalValueIndex: 35, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( + JsonStringReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + keyComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + clrType: typeof(string), + jsonValueReaderWriter: JsonStringReaderWriter.Instance)); + + var refTypeList = complexType.AddProperty( + "RefTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("RefTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + refTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); + refTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; + }); + refTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; + }); + refTypeList.SetAccessors( + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 36), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[36]); + refTypeList.SetPropertyIndexes( + index: 36, + originalValueIndex: 36, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + refTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + keyComparer: new ValueComparer( + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), + providerValueComparer: new ValueComparer( + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), + converter: new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); + + var valueTypeArray = complexType.AddProperty( + "ValueTypeArray", + typeof(DateTime[]), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeArray.SetGetter( + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); + valueTypeArray.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; + }); + valueTypeArray.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; + }); + valueTypeArray.SetAccessors( + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 37), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[37]); + valueTypeArray.SetPropertyIndexes( + index: 37, + originalValueIndex: 37, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeArray.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), + keyComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + bool (DateTime[] v1, DateTime[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (DateTime[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + DateTime[] (DateTime[] source) => source.ToArray()), + clrType: typeof(DateTime[]), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonDateTimeReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + keyComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + providerValueComparer: new ValueComparer( + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), + clrType: typeof(DateTime), + jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); + + var valueTypeEnumerable = complexType.AddProperty( + "ValueTypeEnumerable", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeEnumerable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeEnumerable.SetGetter( + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); + valueTypeEnumerable.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; + }); + valueTypeEnumerable.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; + }); + valueTypeEnumerable.SetAccessors( + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 38), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[38]); + valueTypeEnumerable.SetPropertyIndexes( + index: 38, + originalValueIndex: 38, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeEnumerable.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + providerValueComparer: new ValueComparer>( + bool (IEnumerable v1, IEnumerable v2) => object.Equals(v1, v2), + int (IEnumerable v) => ((object)v).GetHashCode(), + IEnumerable (IEnumerable v) => v), + clrType: typeof(IEnumerable), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeIList = complexType.AddProperty( + "ValueTypeIList", + typeof(IList), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeIList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeIList.SetGetter( + IList (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); + valueTypeIList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; + }); + valueTypeIList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, IList value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; + }); + valueTypeIList.SetAccessors( + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 39), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[39]); + valueTypeIList.SetPropertyIndexes( + index: 39, + originalValueIndex: 39, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeIList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), + keyComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + providerValueComparer: new ValueComparer>( + bool (IList v1, IList v2) => object.Equals(v1, v2), + int (IList v) => ((object)v).GetHashCode(), + IList (IList v) => v), + clrType: typeof(IList), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( + JsonByteReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + keyComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + providerValueComparer: new ValueComparer( + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), + clrType: typeof(byte), + jsonValueReaderWriter: JsonByteReaderWriter.Instance)); + + var valueTypeList = complexType.AddProperty( + "ValueTypeList", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("ValueTypeList", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), + nullable: true); + valueTypeList.SetGetter( + List (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); + valueTypeList.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; + }); + valueTypeList.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, List value) => + { + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; + }); + valueTypeList.SetAccessors( + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 40), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[40]); + valueTypeList.SetPropertyIndexes( + index: 40, + originalValueIndex: 40, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + valueTypeList.TypeMapping = CosmosTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), + keyComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + providerValueComparer: new ValueComparer>( + bool (List v1, List v2) => object.Equals(v1, v2), + int (List v) => ((object)v).GetHashCode(), + List (List v) => v), + clrType: typeof(List), + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( + JsonInt16ReaderWriter.Instance), + elementMapping: CosmosTypeMapping.Default.Clone( + comparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + keyComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + providerValueComparer: new ValueComparer( + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), + clrType: typeof(short), + jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); + + return complexProperty; + } + } + } + + public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) + { + var runtimeForeignKey = declaringEntityType.AddForeignKey(new[] { declaringEntityType.FindProperty("PrincipalBaseId") }, + principalEntityType.FindKey(new[] { principalEntityType.FindProperty("Id") }), + principalEntityType); + + var deriveds = principalEntityType.AddNavigation("Deriveds", + runtimeForeignKey, + onDependent: false, + typeof(ICollection), + propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Deriveds", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + + deriveds.SetGetter( + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); + deriveds.SetSetter( + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); + deriveds.SetMaterializationSetter( + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); + deriveds.SetAccessors( + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + null, + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(deriveds), + null); + deriveds.SetPropertyIndexes( + index: 0, + originalValueIndex: -1, + shadowIndex: -1, + relationshipIndex: 3, + storeGenerationIndex: -1); + deriveds.SetCollectionAccessor, CompiledModelTestBase.PrincipalBase>( + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + ICollection (CompiledModelTestBase.PrincipalBase entity, Action> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection () => ((ICollection)(((ICollection)(new HashSet(ReferenceEqualityComparer.Instance)))))); + return runtimeForeignKey; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var id = runtimeEntityType.FindProperty("Id")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var enum1 = runtimeEntityType.FindProperty("Enum1")!; + var enum2 = runtimeEntityType.FindProperty("Enum2")!; + var flagsEnum1 = runtimeEntityType.FindProperty("FlagsEnum1")!; + var flagsEnum2 = runtimeEntityType.FindProperty("FlagsEnum2")!; + var principalBaseId = runtimeEntityType.FindProperty("PrincipalBaseId")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var owned = runtimeEntityType.FindComplexProperty("Owned")!; + var ownedType = owned.ComplexType; + var details = ownedType.FindProperty("Details")!; + var number = ownedType.FindProperty("Number")!; + var refTypeArray0 = ownedType.FindProperty("RefTypeArray")!; + var refTypeEnumerable0 = ownedType.FindProperty("RefTypeEnumerable")!; + var refTypeIList0 = ownedType.FindProperty("RefTypeIList")!; + var refTypeList0 = ownedType.FindProperty("RefTypeList")!; + var valueTypeArray0 = ownedType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable0 = ownedType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList0 = ownedType.FindProperty("ValueTypeIList")!; + var valueTypeList0 = ownedType.FindProperty("ValueTypeList")!; + var principal = ownedType.FindComplexProperty("Principal")!; + var principalBase = principal.ComplexType; + var alternateId = principalBase.FindProperty("AlternateId")!; + var enum10 = principalBase.FindProperty("Enum1")!; + var enum20 = principalBase.FindProperty("Enum2")!; + var flagsEnum10 = principalBase.FindProperty("FlagsEnum1")!; + var flagsEnum20 = principalBase.FindProperty("FlagsEnum2")!; + var id0 = principalBase.FindProperty("Id")!; + var refTypeArray1 = principalBase.FindProperty("RefTypeArray")!; + var refTypeEnumerable1 = principalBase.FindProperty("RefTypeEnumerable")!; + var refTypeIList1 = principalBase.FindProperty("RefTypeIList")!; + var refTypeList1 = principalBase.FindProperty("RefTypeList")!; + var valueTypeArray1 = principalBase.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable1 = principalBase.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList1 = principalBase.FindProperty("ValueTypeIList")!; + var valueTypeList1 = principalBase.FindProperty("ValueTypeList")!; + var key = runtimeEntityType.FindKey(new[] { id }); + key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key)); + key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); + var key0 = runtimeEntityType.FindKey(new[] { __id }); + key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key0)); + key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key0)); + var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, JObject, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject))), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray0))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable0))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue>(refTypeIList0))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList0))))))), (((object)(source.GetCurrentValue>(refTypeList0))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList0))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray0))))))), (source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList0))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList0))))))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue(enum10)), (source.GetCurrentValue(enum20) == null ? null : ((ValueComparer)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue(enum20)))))); + var entity0 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum20)), (source.GetCurrentValue(id0) == null ? null : ((ValueComparer)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue(id0))), (((object)(source.GetCurrentValue(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray1))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable1))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue>(refTypeIList1))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList1))))))), (((object)(source.GetCurrentValue>(refTypeList1))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList1))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray1))))))), (source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList1))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList1)))))))))) }))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot((default(long? ) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long? ))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(long? ), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity1 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity1))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 41, + navigationCount: 1, + complexPropertyCount: 2, + originalValueCount: 41, + shadowCount: 4, + relationshipCount: 4, + storeGeneratedCount: 1); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..e85cd7e3f4b --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,60 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ICollection Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs new file mode 100644 index 00000000000..f48dc7cf08e --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs @@ -0,0 +1,119 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Reflection; +using Microsoft.EntityFrameworkCore.ChangeTracking; +using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Newtonsoft.Json.Linq; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + [EntityFrameworkInternal] + public partial class PrincipalDerivedEntityType + { + public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType baseEntityType = null) + { + var runtimeEntityType = model.AddEntityType( + "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+PrincipalDerived>", + typeof(CompiledModelTestBase.PrincipalDerived>), + baseEntityType, + discriminatorProperty: "Discriminator", + discriminatorValue: "PrincipalDerived", + propertyCount: 0); + + return runtimeEntityType; + } + + public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) + { + var id = runtimeEntityType.FindProperty("Id")!; + var discriminator = runtimeEntityType.FindProperty("Discriminator")!; + var enum1 = runtimeEntityType.FindProperty("Enum1")!; + var enum2 = runtimeEntityType.FindProperty("Enum2")!; + var flagsEnum1 = runtimeEntityType.FindProperty("FlagsEnum1")!; + var flagsEnum2 = runtimeEntityType.FindProperty("FlagsEnum2")!; + var principalBaseId = runtimeEntityType.FindProperty("PrincipalBaseId")!; + var refTypeArray = runtimeEntityType.FindProperty("RefTypeArray")!; + var refTypeEnumerable = runtimeEntityType.FindProperty("RefTypeEnumerable")!; + var refTypeIList = runtimeEntityType.FindProperty("RefTypeIList")!; + var refTypeList = runtimeEntityType.FindProperty("RefTypeList")!; + var valueTypeArray = runtimeEntityType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable = runtimeEntityType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList = runtimeEntityType.FindProperty("ValueTypeIList")!; + var valueTypeList = runtimeEntityType.FindProperty("ValueTypeList")!; + var __id = runtimeEntityType.FindProperty("__id")!; + var __jObject = runtimeEntityType.FindProperty("__jObject")!; + var owned = runtimeEntityType.FindComplexProperty("Owned")!; + var ownedType = owned.ComplexType; + var details = ownedType.FindProperty("Details")!; + var number = ownedType.FindProperty("Number")!; + var refTypeArray0 = ownedType.FindProperty("RefTypeArray")!; + var refTypeEnumerable0 = ownedType.FindProperty("RefTypeEnumerable")!; + var refTypeIList0 = ownedType.FindProperty("RefTypeIList")!; + var refTypeList0 = ownedType.FindProperty("RefTypeList")!; + var valueTypeArray0 = ownedType.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable0 = ownedType.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList0 = ownedType.FindProperty("ValueTypeIList")!; + var valueTypeList0 = ownedType.FindProperty("ValueTypeList")!; + var principal = ownedType.FindComplexProperty("Principal")!; + var principalBase = principal.ComplexType; + var alternateId = principalBase.FindProperty("AlternateId")!; + var enum10 = principalBase.FindProperty("Enum1")!; + var enum20 = principalBase.FindProperty("Enum2")!; + var flagsEnum10 = principalBase.FindProperty("FlagsEnum1")!; + var flagsEnum20 = principalBase.FindProperty("FlagsEnum2")!; + var id0 = principalBase.FindProperty("Id")!; + var refTypeArray1 = principalBase.FindProperty("RefTypeArray")!; + var refTypeEnumerable1 = principalBase.FindProperty("RefTypeEnumerable")!; + var refTypeIList1 = principalBase.FindProperty("RefTypeIList")!; + var refTypeList1 = principalBase.FindProperty("RefTypeList")!; + var valueTypeArray1 = principalBase.FindProperty("ValueTypeArray")!; + var valueTypeEnumerable1 = principalBase.FindProperty("ValueTypeEnumerable")!; + var valueTypeIList1 = principalBase.FindProperty("ValueTypeIList")!; + var valueTypeList1 = principalBase.FindProperty("ValueTypeList")!; + var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; + runtimeEntityType.SetOriginalValuesFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity1 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, JObject, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject))), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray0))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable0))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue>(refTypeIList0))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList0))))))), (((object)(source.GetCurrentValue>(refTypeList0))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList0))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray0))))))), (source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList0))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList0))))))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue(enum10)), (source.GetCurrentValue(enum20) == null ? null : ((ValueComparer)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue(enum20)))))); + var entity2 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg0, ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum20)), (source.GetCurrentValue(id0) == null ? null : ((ValueComparer)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue(id0))), (((object)(source.GetCurrentValue(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray1))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable1))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue>(refTypeIList1))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList1))))))), (((object)(source.GetCurrentValue>(refTypeList1))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList1))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray1))))))), (source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList1))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList1)))))))))) }))); + }); + runtimeEntityType.SetStoreGeneratedValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot((default(long? ) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))))))); + runtimeEntityType.SetTemporaryValuesFactory( + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long? ))))); + runtimeEntityType.SetShadowValuesFactory( + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); + runtimeEntityType.SetEmptyShadowValuesFactory( + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(long? ), default(string), default(JObject))))); + runtimeEntityType.SetRelationshipSnapshotFactory( + ISnapshot (InternalEntityEntry source) => + { + var entity3 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity3))))); + }); + runtimeEntityType.Counts = new PropertyCounts( + propertyCount: 41, + navigationCount: 1, + complexPropertyCount: 2, + originalValueCount: 41, + shadowCount: 4, + relationshipCount: 4, + storeGeneratedCount: 1); + + Customize(runtimeEntityType); + } + + static partial void Customize(RuntimeEntityType runtimeEntityType); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..ae6e1779611 --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs index 629753c1325..565c5c4f909 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Cosmos.Storage.Internal; @@ -43,20 +42,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelTestBase.DependentDerived entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentDerived entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) == 0, - (CompiledModelTestBase.DependentDerived instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentDerived instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance) == 0); + int (CompiledModelTestBase.DependentDerived entity) => DependentBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.DependentDerived entity) => DependentBaseUnsafeAccessors.Id(entity) == 0, + int (CompiledModelTestBase.DependentDerived instance) => DependentBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.DependentDerived instance) => DependentBaseUnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelTestBase.DependentDerived entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived entity, int value) => DependentBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived entity, int value) => DependentBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Id(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors.Id(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -65,21 +64,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var data = runtimeEntityType.AddProperty( "Data", @@ -88,20 +86,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentDerived).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); data.SetGetter( - (CompiledModelTestBase.DependentDerived entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived entity) => DependentDerivedUnsafeAccessors.Data(entity), + bool (CompiledModelTestBase.DependentDerived entity) => DependentDerivedUnsafeAccessors.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived instance) => DependentDerivedUnsafeAccessors.Data(instance), + bool (CompiledModelTestBase.DependentDerived instance) => DependentDerivedUnsafeAccessors.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived entity, string value) => DependentDerivedUnsafeAccessors.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived entity, string value) => DependentDerivedUnsafeAccessors.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(data, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue(data), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors.Data(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors.Data(((CompiledModelTestBase.DependentDerived)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(data, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue(data), + object (ValueBuffer valueBuffer) => valueBuffer[1]); data.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -110,20 +108,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var discriminator = runtimeEntityType.AddProperty( "Discriminator", @@ -131,11 +128,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); discriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -144,17 +141,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); @@ -164,11 +161,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new IdValueGeneratorFactory().Create); __id.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(1), - (InternalEntityEntry entry) => entry.ReadShadowValue(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 1), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadShadowValue(1), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(__id, 3), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(__id, 1), + object (ValueBuffer valueBuffer) => valueBuffer[3]); __id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -177,17 +174,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); __id.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); __id.SetCurrentValueComparer(new EntryCurrentValueComparer(__id)); @@ -201,11 +198,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); __jObject.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue(0) : entry.FlaggedAsTemporary(4) && entry.ReadShadowValue(2) == null ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(2), - (InternalEntityEntry entry) => entry.ReadShadowValue(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), - (ValueBuffer valueBuffer) => valueBuffer[4]); + JObject (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(4) && entry.ReadShadowValue(2) == null ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(2))), + JObject (InternalEntityEntry entry) => entry.ReadShadowValue(2), + JObject (InternalEntityEntry entry) => entry.ReadOriginalValue(__jObject, 4), + JObject (InternalEntityEntry entry) => entry.GetCurrentValue(__jObject), + object (ValueBuffer valueBuffer) => valueBuffer[4]); __jObject.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -214,17 +211,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); __jObject.TypeMapping = CosmosTypeMapping.Default.Clone( comparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), keyComparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), providerValueComparer: new ValueComparer( - (JObject v1, JObject v2) => object.Equals(v1, v2), - (JObject v) => ((object)v).GetHashCode(), - (JObject v) => v), + bool (JObject v1, JObject v2) => object.Equals(v1, v2), + int (JObject v) => ((object)v).GetHashCode(), + JObject (JObject v) => v), clrType: typeof(JObject)); __jObject.AddAnnotation("Cosmos:PropertyName", ""); @@ -252,24 +249,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key0)); key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key0)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(data) == null ? null : ((ValueComparer)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue(data)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), source.GetCurrentValue(__id) == null ? null : ((ValueComparer)((IProperty)__id).GetValueComparer()).Snapshot(source.GetCurrentValue(__id)), source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)((IProperty)__jObject).GetValueComparer()).Snapshot(source.GetCurrentValue(__jObject))); + var entity = ((CompiledModelTestBase.DependentDerived)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(data) == null ? null : ((ValueComparer)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue(data))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetValueComparer())).Snapshot(source.GetCurrentValue(__id))), (source.GetCurrentValue(__jObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(source.GetCurrentValue(__jObject)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(default(JObject) == null ? null : ((ValueComparer)((IProperty)__jObject).GetValueComparer()).Snapshot(default(JObject)))); + ISnapshot () => ((ISnapshot)(new Snapshot((default(JObject) == null ? null : ((ValueComparer)(((IProperty)__jObject).GetValueComparer())).Snapshot(default(JObject))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(JObject))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(JObject))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("__id") ? (string)source["__id"] : null, source.ContainsKey("__jObject") ? (JObject)source["__jObject"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("__id") ? ((string)(source["__id"])) : null), (source.ContainsKey("__jObject") ? ((JObject)(source["__jObject"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot(default(string), default(string), default(JObject))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(string), default(JObject))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(__id) == null ? null : ((ValueComparer)((IProperty)__id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(__id))); + var entity = ((CompiledModelTestBase.DependentDerived)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(__id) == null ? null : ((ValueComparer)(((IProperty)__id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(__id)))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 5, @@ -284,11 +281,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived @this); } } diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived @this); + } +} diff --git a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/CompiledModelCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/CompiledModelCosmosTest.cs index 3ed4080a3bb..f37321b37b5 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Scaffolding/CompiledModelCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Scaffolding/CompiledModelCosmosTest.cs @@ -143,16 +143,26 @@ public virtual Task Basic_cosmos_model() Assert.Equal(2, dataEntity.GetKeys().Count()); - Assert.Equal(new[] { id, partitionId, blob, storeId, jObject, eTag }, dataEntity.GetProperties()); + Assert.Equal([id, partitionId, blob, storeId, jObject, eTag], dataEntity.GetProperties()); }); - [ConditionalFact(Skip = "Primitive collections not supported yet")] - public override Task BigModel() - => base.BigModel(); + protected override void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumns) + { + base.BuildBigModel(modelBuilder, jsonColumns); + + modelBuilder.Entity>( + eb => eb.ToContainer("Dependents")); + modelBuilder.Entity>( + eb => eb.HasDiscriminator().IsComplete(false)); + } - [ConditionalFact(Skip = "Primitive collections not supported yet")] - public override Task ComplexTypes() - => base.ComplexTypes(); + protected override void AssertBigModel(IModel model, bool jsonColumns) + { + base.AssertBigModel(model, jsonColumns); + + var principalDerived = model.FindEntityType(typeof(PrincipalDerived>))!; + Assert.Equal("PrincipalDerived", principalDerived.GetDiscriminatorValue()); + } protected override TestHelpers TestHelpers => CosmosTestHelpers.Instance; protected override ITestStoreFactory TestStoreFactory => CosmosTestStoreFactory.Instance; diff --git a/test/EFCore.Design.Tests/Query/LinqToCSharpSyntaxTranslatorTest.cs b/test/EFCore.Design.Tests/Query/LinqToCSharpSyntaxTranslatorTest.cs index b3ce434c6a1..f40df69279a 100644 --- a/test/EFCore.Design.Tests/Query/LinqToCSharpSyntaxTranslatorTest.cs +++ b/test/EFCore.Design.Tests/Query/LinqToCSharpSyntaxTranslatorTest.cs @@ -150,10 +150,10 @@ public void Private_instance_field_AssignOperators_with_replacements(ExpressionT }); [Theory] - [InlineData(ExpressionType.Negate, "-i")] - [InlineData(ExpressionType.NegateChecked, "-i")] - [InlineData(ExpressionType.Not, "~i")] - [InlineData(ExpressionType.OnesComplement, "~i")] + [InlineData(ExpressionType.Negate, "-(i)")] + [InlineData(ExpressionType.NegateChecked, "-(i)")] + [InlineData(ExpressionType.Not, "~(i)")] + [InlineData(ExpressionType.OnesComplement, "~(i)")] [InlineData(ExpressionType.UnaryPlus, "+i")] [InlineData(ExpressionType.Increment, "i + 1")] [InlineData(ExpressionType.Decrement, "i - 1")] @@ -163,8 +163,8 @@ public void Unary_expression_int(ExpressionType expressionType, string expected) expected); [Theory] - [InlineData(ExpressionType.Not, "!b")] - [InlineData(ExpressionType.IsFalse, "!b")] + [InlineData(ExpressionType.Not, "!(b)")] + [InlineData(ExpressionType.IsFalse, "!(b)")] [InlineData(ExpressionType.IsTrue, "b")] public void Unary_expression_bool(ExpressionType expressionType, string expected) => AssertExpression( @@ -186,7 +186,7 @@ public void Unary_statement(ExpressionType expressionType, string expected) MakeUnary(expressionType, i, typeof(int))), $$""" { - int i = default; + int i = default(int); {{expected}}; } """); @@ -204,7 +204,7 @@ public void Unary_Convert() Convert( Parameter(typeof(object), "i"), typeof(string)), - "(string)i"); + "((string)(i))"); [Fact] public void Unary_Throw() @@ -222,7 +222,7 @@ public void Unary_Unbox() public void Unary_Quote() => AssertExpression( Quote((Expression>)(s => s.Length)), - "(string s) => s.Length"); + "int (string s) => s.Length"); [Fact] public void Unary_TypeAs() @@ -309,7 +309,7 @@ public void Internal_instance_field_read() public void Not() => AssertExpression( Expression.Not(Constant(true)), - "!true"); + "!(true)"); [Fact] public void MemberInit_with_MemberAssignment() @@ -481,9 +481,9 @@ public void Method_call_with_in_out_ref_parameters() Call(WithInOutRefParameterMethod, [inParam, outParam, refParam])), """ { - int inParam = default; - int outParam = default; - int refParam = default; + int inParam = default(int); + int outParam = default(int); + int refParam = default(int); LinqToCSharpSyntaxTranslatorTest.WithInOutRefParameter(in inParam, out outParam, ref refParam); } """); @@ -543,7 +543,7 @@ public void Instantiation_with_required_properties_with_SetsRequiredMembers() public void Lambda_with_expression_body() => AssertExpression( Lambda>(Constant(true)), - "() => true"); + "bool () => true"); [Fact] public void Lambda_with_block_body() @@ -557,7 +557,7 @@ public void Lambda_with_block_body() Assign(i, Constant(8)), i)), """ -() => +int () => { var i = 8; return i; @@ -569,7 +569,7 @@ public void Lambda_with_block_body() public void Lambda_with_no_parameters() => AssertExpression( Lambda>(Constant(true)), - "() => true"); + "bool () => true"); [Fact] public void Lambda_with_one_parameter() @@ -578,7 +578,7 @@ public void Lambda_with_one_parameter() AssertExpression( Lambda>(Constant(true), i), - "(int i) => true"); + "bool (int i) => true"); } [Fact] @@ -589,7 +589,7 @@ public void Lambda_with_two_parameters() AssertExpression( Lambda>(Add(i, j), i, j), - "(int i, int j) => i + j"); + "int (int i, int j) => i + j"); } [Fact] @@ -636,14 +636,14 @@ public void Invocation_with_property_argument() public void Conditional_expression() => AssertExpression( Condition(Constant(true), Constant(1), Constant(2)), - "true ? 1 : 2"); + "(true ? 1 : 2)"); [Fact] public void Conditional_without_false_value_fails() => Assert.Throws( () => AssertExpression( IfThen(Constant(true), Constant(8)), - "true ? 1 : 2")); + "(true ? 8)")); [Fact] public void Conditional_statement() @@ -730,7 +730,7 @@ public void IfThenElse_nested() Block(Assign(variable, Constant(3)))))), """ { - int i = default; + int i = default(int); if (true) { i = 1; @@ -758,7 +758,7 @@ public void Conditional_expression_with_block_in_lambda() Constant(8)), Constant(9))), """ -() => +int () => { if (true) { @@ -849,7 +849,7 @@ public void Switch_expression_nested() Constant(200))))), """ { - int k = default; + int k = default(int); var j = 8; var i = j switch { @@ -874,7 +874,7 @@ public void Switch_expression_non_constant_arm() Constant(0), SwitchCase(Constant(2), Parameter(typeof(Blog), "blog2")), SwitchCase(Constant(3), Parameter(typeof(Blog), "blog3"))), - "blog1 == blog2 ? 2 : blog1 == blog3 ? 3 : 0"); + "(blog1 == blog2 ? 2 : (blog1 == blog3 ? 3 : 0))"); [Fact] public void Switch_statement_with_non_constant_label() @@ -913,7 +913,7 @@ public void Switch_statement_without_default() SwitchCase(Block(typeof(void), Assign(parameter, Constant(10))), Constant(-10)))), """ { - int i = default; + int i = default(int); switch (7) { case -9: @@ -947,7 +947,7 @@ public void Switch_statement_with_default() SwitchCase(Assign(parameter, Constant(10)), Constant(-10)))), """ { - int i = default; + int i = default(int); switch (7) { case -9: @@ -979,7 +979,7 @@ public void Switch_statement_with_multiple_labels() SwitchCase(Assign(parameter, Constant(10)), Constant(-10)))), """ { - int i = default; + int i = default(int); switch (7) { case -9: @@ -1107,7 +1107,7 @@ public void Variable_with_same_name_in_lambda_does_not_get_renamed() """ { var i = 8; - f = (int i) => i == 5; + f = bool (int i) => i == 5; } """); } @@ -1132,9 +1132,9 @@ public void Same_parameter_instance_is_used_twice_in_nested_lambdas() Constant(true)), i)), """ -f1 = (int i) => +f1 = bool (int i) => { - f2 = (int i) => i == 5; + f2 = bool (int i) => i == 5; return true; } """); @@ -1145,7 +1145,7 @@ public void Block_with_non_standalone_expression_as_statement() => AssertStatement(Block(Add(Constant(1), Constant(2))), """ { - _ = 1 + 2; + _ = (1 + 2); } """); @@ -1397,7 +1397,7 @@ public void Lift_variable_in_expression_block() Constant(9))))), """ { - int j = default; + int j = default(int); LinqToCSharpSyntaxTranslatorTest.Foo(); j = 8; var i = 9; @@ -1416,7 +1416,7 @@ public void Lift_block_in_lambda_body_expression() Call(BarMethod))), []), """ -() => +int () => { LinqToCSharpSyntaxTranslatorTest.Foo(); return LinqToCSharpSyntaxTranslatorTest.ReturnsIntWithParam(LinqToCSharpSyntaxTranslatorTest.Bar()); @@ -1430,7 +1430,7 @@ public void Do_not_lift_block_in_lambda_body() Block(Block(Constant(8))), []), """ -() => +int () => { { return 8; @@ -1480,7 +1480,7 @@ public void Lift_switch_expression() SwitchCase(Constant(2), Constant(9))))), """ { - int i = default; + int i = default(int); var j = 8; switch (j) { @@ -1534,8 +1534,8 @@ public void Lift_nested_switch_expression() Constant(200))))), """ { - int i = default; - int k = default; + int i = default(int); + int k = default(int); var j = 8; switch (j) { @@ -1598,7 +1598,7 @@ public void Lift_non_literal_switch_expression() SwitchCase(Constant(3), Parameter(typeof(Blog), "blog4"))))), """ { - int i = default; + int i = default(int); if (blog1 == blog2) { LinqToCSharpSyntaxTranslatorTest.ReturnsIntWithParam(8); @@ -1613,7 +1613,7 @@ public void Lift_non_literal_switch_expression() } else { - i = blog1 == blog4 ? 3 : 0; + i = (blog1 == blog4 ? 3 : 0); } } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..9bbed4ed29f --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,48 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List _valueTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalBase Principal(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs index b0fc45cfa5c..0b09acd4b1a 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -48,20 +47,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity).HasValue ? entry.ReadTemporaryValue>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && !(PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue(0) : PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -70,23 +69,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var discriminator = runtimeEntityType.AddProperty( "Discriminator", @@ -94,11 +92,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[1]); discriminator.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -107,17 +105,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); @@ -128,20 +126,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AnEnum)0); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum1.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -150,20 +148,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -172,20 +169,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum2, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum2.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -194,22 +191,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); enum2.SetValueComparer(new NullableValueComparer(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer(enum2.TypeMapping.KeyComparer)); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -218,20 +214,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AFlagsEnum)0); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum1.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -240,20 +236,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), clrType: typeof(CompiledModelTestBase.AFlagsEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -262,20 +257,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AFlagsEnum)0); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum2.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -284,31 +279,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), clrType: typeof(CompiledModelTestBase.AFlagsEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2", "TestNamespace") }); var principalBaseId = runtimeEntityType.AddProperty( "PrincipalBaseId", typeof(long?), nullable: true); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue>(1) : entry.FlaggedAsTemporary(6) && !entry.ReadShadowValue>(1).HasValue ? entry.ReadTemporaryValue>(1) : entry.ReadShadowValue>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(principalBaseId, 6), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue>(principalBaseId, 1), - (ValueBuffer valueBuffer) => valueBuffer[6]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue(1) : (entry.FlaggedAsTemporary(6) && !(entry.ReadShadowValue(1).HasValue) ? entry.ReadTemporaryValue(1) : entry.ReadShadowValue(1))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue(1), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(principalBaseId, 6), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(principalBaseId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[6]); principalBaseId.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -317,17 +311,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalBaseId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); principalBaseId.SetValueComparer(new NullableValueComparer(principalBaseId.TypeMapping.Comparer)); @@ -341,20 +335,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeArray.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -363,51 +357,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -416,20 +409,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 8), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeEnumerable.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -438,37 +431,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -477,20 +469,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 9), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeIList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -499,37 +491,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -538,20 +529,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 10), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -560,51 +551,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -613,20 +603,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeArray.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -635,37 +625,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), clrType: typeof(DateTime), jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -674,20 +663,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 12), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeEnumerable.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -696,37 +685,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -735,20 +723,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 13), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeIList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -757,37 +745,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -796,20 +783,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 14), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -818,37 +805,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), clrType: typeof(short), jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); OwnedComplexProperty.Create(runtimeEntityType); var key = runtimeEntityType.AddKey( @@ -875,19 +861,19 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) var complexType = complexProperty.ComplexType; complexProperty.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); complexProperty.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); complexProperty.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); complexProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), null); complexProperty.SetPropertyIndexes( index: 0, @@ -902,61 +888,56 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), propertyAccessMode: PropertyAccessMode.FieldDuringConstruction, nullable: true, - concurrencyToken: true, - valueGenerated: ValueGenerated.OnAddOrUpdate, - beforeSaveBehavior: PropertySaveBehavior.Ignore, - afterSaveBehavior: PropertySaveBehavior.Ignore, maxLength: 64, unicode: false, precision: 3, scale: 2, sentinel: ""); details.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details, - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details) == null) && (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details) == "", - (CompiledModelTestBase.OwnedType instance) => instance.Details, - (CompiledModelTestBase.OwnedType instance) => !(instance.Details == null) && instance.Details == ""); + string (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details), + bool (CompiledModelTestBase.PrincipalBase entity) => !((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == null) && (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == "", + string (CompiledModelTestBase.OwnedType instance) => instance.Details, + bool (CompiledModelTestBase.OwnedType instance) => !(instance.Details == null) && instance.Details == ""); details.SetSetter( (CompiledModelTestBase.PrincipalBase entity, string value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); level1.Details = value; }); details.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, string value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); level1.Details = value; }); details.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(15) ? entry.ReadStoreGeneratedValue(2) : entry.FlaggedAsTemporary(15) && !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details) == null) && (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details) == "" ? entry.ReadTemporaryValue(2) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details, - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details, - (InternalEntityEntry entry) => entry.ReadOriginalValue(details, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue(details), - (ValueBuffer valueBuffer) => valueBuffer[15]); + string (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details), + string (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(details, 15), + string (InternalEntityEntry entry) => entry.GetCurrentValue(details), + object (ValueBuffer valueBuffer) => valueBuffer[15]); details.SetPropertyIndexes( index: 15, originalValueIndex: 15, shadowIndex: -1, relationshipIndex: -1, - storeGenerationIndex: 2); + storeGenerationIndex: -1); details.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); details.AddAnnotation("foo", "bar"); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ((string)null, (string)null), ((string)null, (string)null), ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = complexType.AddProperty( "Number", @@ -965,28 +946,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( (CompiledModelTestBase.PrincipalBase entity, int value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; }); number.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, int value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; }); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue(number, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue(number), - (ValueBuffer valueBuffer) => valueBuffer[16]); + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(number, 16), + int (InternalEntityEntry entry) => entry.GetCurrentValue(number), + object (ValueBuffer valueBuffer) => valueBuffer[16]); number.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -995,20 +976,19 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); number.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = complexType.AddProperty( "RefTypeArray", @@ -1017,28 +997,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; }); refTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; }); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 17), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); refTypeArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1047,51 +1027,50 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = complexType.AddProperty( "RefTypeEnumerable", @@ -1100,28 +1079,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; }); refTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; }); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[18]); + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 18), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[18]); refTypeEnumerable.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1130,37 +1109,36 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = complexType.AddProperty( "RefTypeIList", @@ -1169,28 +1147,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; }); refTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; }); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[19]); + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 19), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[19]); refTypeIList.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1199,37 +1177,36 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = complexType.AddProperty( "RefTypeList", @@ -1238,28 +1215,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; }); refTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; }); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[20]); + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 20), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[20]); refTypeList.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1268,51 +1245,50 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = complexType.AddProperty( "ValueTypeArray", @@ -1321,28 +1297,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; }); valueTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; }); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 21), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[21]); valueTypeArray.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1351,37 +1327,36 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), clrType: typeof(DateTime), jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = complexType.AddProperty( "ValueTypeEnumerable", @@ -1390,28 +1365,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; }); valueTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; }); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[22]); + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 22), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[22]); valueTypeEnumerable.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1420,37 +1395,36 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = complexType.AddProperty( "ValueTypeIList", @@ -1459,28 +1433,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; }); valueTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; }); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[23]); + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 23), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[23]); valueTypeIList.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1489,37 +1463,36 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = complexType.AddProperty( "ValueTypeList", @@ -1528,28 +1501,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; }); valueTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; }); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[24]); + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 24), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[24]); valueTypeList.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1558,42 +1531,40 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), clrType: typeof(short), jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); PrincipalComplexProperty.Create(complexType); complexType.AddAnnotation("go", "brr"); complexProperty.AddAnnotation("goo", "ber"); - complexProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return complexProperty; } @@ -1611,27 +1582,27 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) var complexType = complexProperty.ComplexType; complexProperty.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(instance) == null); + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance) == null); complexProperty.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; }); complexProperty.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; }); complexProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => entry.GetCurrentValue(complexProperty), null); complexProperty.SetPropertyIndexes( index: 1, @@ -1645,30 +1616,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("AlternateId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))).AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))).AlternateId) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); level2.AlternateId = value; }); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); level2.AlternateId = value; }); alternateId.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))).AlternateId, - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue(alternateId, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue(alternateId), - (ValueBuffer valueBuffer) => valueBuffer[25]); + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(alternateId, 25), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue(alternateId), + object (ValueBuffer valueBuffer) => valueBuffer[25]); alternateId.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1677,17 +1648,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); alternateId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), clrType: typeof(Guid), jsonValueReaderWriter: JsonGuidReaderWriter.Instance); @@ -1698,30 +1669,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AnEnum)0); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; }); enum1.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; }); enum1.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), - (ValueBuffer valueBuffer) => valueBuffer[26]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(enum1, 26), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[26]); enum1.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1730,20 +1701,19 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); enum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = complexType.AddProperty( "Enum2", @@ -1752,30 +1722,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(level2) = value == null ? value : (Nullable)(CompiledModelTestBase.AnEnum)value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); }); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(level2) = value == null ? value : (Nullable)(CompiledModelTestBase.AnEnum)value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); }); enum2.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum2, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[27]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue(enum2, 27), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[27]); enum2.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1784,22 +1754,21 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); enum2.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); enum2.SetValueComparer(new NullableValueComparer(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer(enum2.TypeMapping.KeyComparer)); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = complexType.AddProperty( "FlagsEnum1", @@ -1808,30 +1777,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AFlagsEnum)0); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; }); flagsEnum1.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; }); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[28]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum1, 28), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[28]); flagsEnum1.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -1840,20 +1809,19 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); flagsEnum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), clrType: typeof(CompiledModelTestBase.AFlagsEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = complexType.AddProperty( "FlagsEnum2", @@ -1862,30 +1830,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AFlagsEnum)0); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum2.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; }); flagsEnum2.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; }); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[29]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue(flagsEnum2, 29), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[29]); flagsEnum2.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -1894,20 +1862,19 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); flagsEnum2.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), clrType: typeof(CompiledModelTestBase.AFlagsEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter.Instance); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2", "TestNamespace") }); var id = complexType.AddProperty( "Id", @@ -1916,30 +1883,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => + (CompiledModelTestBase.PrincipalBase entity, long? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; }); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable value) => + (CompiledModelTestBase.PrincipalBase entity, long? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; }); id.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(id, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue>(id), - (ValueBuffer valueBuffer) => valueBuffer[30]); + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 30), + long? (InternalEntityEntry entry) => entry.GetCurrentValue(id), + object (ValueBuffer valueBuffer) => valueBuffer[30]); id.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -1948,22 +1915,21 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetValueComparer(new NullableValueComparer(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer(id.TypeMapping.KeyComparer)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var refTypeArray = complexType.AddProperty( "RefTypeArray", @@ -1972,30 +1938,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; }); refTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; }); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[31]); + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue(refTypeArray, 31), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[31]); refTypeArray.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -2004,51 +1970,50 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = complexType.AddProperty( "RefTypeEnumerable", @@ -2057,30 +2022,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; }); refTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; }); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[32]); + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeEnumerable, 32), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[32]); refTypeEnumerable.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -2089,37 +2054,36 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = complexType.AddProperty( "RefTypeIList", @@ -2128,30 +2092,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; }); refTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; }); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[33]); + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeIList, 33), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[33]); refTypeIList.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -2160,37 +2124,36 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = complexType.AddProperty( "RefTypeList", @@ -2199,30 +2162,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; }); refTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; }); refTypeList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[34]); + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(refTypeList, 34), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[34]); refTypeList.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -2231,51 +2194,50 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = complexType.AddProperty( "ValueTypeArray", @@ -2284,30 +2246,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; }); valueTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; }); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[35]); + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue(valueTypeArray, 35), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[35]); valueTypeArray.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -2316,37 +2278,36 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer(new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), clrType: typeof(DateTime), jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = complexType.AddProperty( "ValueTypeEnumerable", @@ -2355,30 +2316,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; }); valueTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; }); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[36]); + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeEnumerable, 36), + IEnumerable (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[36]); valueTypeEnumerable.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -2387,37 +2348,36 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = complexType.AddProperty( "ValueTypeIList", @@ -2426,30 +2386,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; }); valueTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; }); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[37]); + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeIList, 37), + IList (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[37]); valueTypeIList.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -2458,37 +2418,36 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = complexType.AddProperty( "ValueTypeList", @@ -2497,30 +2456,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; }); valueTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; }); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[38]); + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List (InternalEntityEntry entry) => entry.ReadOriginalValue>(valueTypeList, 38), + List (InternalEntityEntry entry) => entry.GetCurrentValue>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[38]); valueTypeList.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2529,117 +2488,40 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), clrType: typeof(short), jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); - complexProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal", "TestNamespace") }); return complexProperty; } - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalBase UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); } - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) @@ -2656,19 +2538,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); deriveds.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); deriveds.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue>(deriveds), + ICollection (InternalEntityEntry entry) => entry.GetCurrentValue>(deriveds), null); deriveds.SetPropertyIndexes( index: 0, @@ -2677,12 +2559,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 2, storeGenerationIndex: -1); deriveds.SetCollectionAccessor, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection)collection, - (CompiledModelTestBase.PrincipalBase entity, Action> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection)(ICollection)new HashSet(ReferenceEqualityComparer.Instance)); - deriveds.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection)(collection)), + ICollection (CompiledModelTestBase.PrincipalBase entity, Action> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection () => ((ICollection)(((ICollection)(new HashSet(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -2736,26 +2617,26 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - var liftedArg = (ISnapshot)new Snapshot, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray0) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray0).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray0)), (object)source.GetCurrentValue>(refTypeEnumerable0) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable0)), (object)source.GetCurrentValue>(refTypeIList0) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList0)), (object)source.GetCurrentValue>(refTypeList0) == null ? null : (List)((ValueComparer)((IProperty)refTypeList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList0)), (IEnumerable)source.GetCurrentValue(valueTypeArray0) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray0)), source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable0).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0)), (IEnumerable)source.GetCurrentValue>(valueTypeIList0) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList0)), (IEnumerable)source.GetCurrentValue>(valueTypeList0) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList0)), ((ValueComparer)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)((IProperty)enum10).GetValueComparer()).Snapshot(source.GetCurrentValue(enum10)), source.GetCurrentValue>(enum20) == null ? null : ((ValueComparer>)((IProperty)enum20).GetValueComparer()).Snapshot(source.GetCurrentValue>(enum20)), ((ValueComparer)((IProperty)flagsEnum10).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)((IProperty)flagsEnum20).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum20))); - var entity0 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, (ISnapshot)new Snapshot, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id0) == null ? null : ((ValueComparer>)((IProperty)id0).GetValueComparer()).Snapshot(source.GetCurrentValue>(id0)), (object)source.GetCurrentValue(refTypeArray1) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray1).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray1)), (object)source.GetCurrentValue>(refTypeEnumerable1) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable1)), (object)source.GetCurrentValue>(refTypeIList1) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList1)), (object)source.GetCurrentValue>(refTypeList1) == null ? null : (List)((ValueComparer)((IProperty)refTypeList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList1)), (IEnumerable)source.GetCurrentValue(valueTypeArray1) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray1)), source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable1).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1)), (IEnumerable)source.GetCurrentValue>(valueTypeIList1) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList1)), (IEnumerable)source.GetCurrentValue>(valueTypeList1) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList1))) }); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray0))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable0))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue>(refTypeIList0))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList0))))))), (((object)(source.GetCurrentValue>(refTypeList0))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList0))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray0))))))), (source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList0))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList0))))))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue(enum10)), (source.GetCurrentValue(enum20) == null ? null : ((ValueComparer)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue(enum20))), ((ValueComparer)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum20))))); + var entity0 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>((source.GetCurrentValue(id0) == null ? null : ((ValueComparer)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue(id0))), (((object)(source.GetCurrentValue(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray1))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable1))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue>(refTypeIList1))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList1))))))), (((object)(source.GetCurrentValue>(refTypeList1))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList1))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray1))))))), (source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList1))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList1)))))))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot, Nullable, string>(default(Nullable) == null ? null : ((ValueComparer>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable)), default(Nullable) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable)), default(string) == null ? null : ((ValueComparer)((IProperty)details).GetValueComparer()).Snapshot(default(string)))); + ISnapshot () => ((ISnapshot)(new Snapshot((default(long? ) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot, Nullable, string>(default(Nullable), default(Nullable), default(string))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long? ), default(long? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalBaseId") ? (Nullable)source["PrincipalBaseId"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot>(default(string), default(Nullable))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity1 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot, Nullable, object>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue>(id)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity1))); + var entity1 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity1))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 39, @@ -2764,53 +2645,11 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) originalValueCount: 39, shadowCount: 2, relationshipCount: 3, - storeGeneratedCount: 3); + storeGeneratedCount: 2); Customize(runtimeEntityType); } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IEnumerable UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref IList UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref List UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref ICollection UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..e85cd7e3f4b --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,60 @@ +// +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IEnumerable ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref IList ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref List ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref ICollection Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs index 8ebf1957459..67fb300f589 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs @@ -78,26 +78,26 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var valueTypeList1 = principalBase.FindProperty("ValueTypeList")!; var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity1 = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray0) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray0).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray0)), (object)source.GetCurrentValue>(refTypeEnumerable0) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable0)), (object)source.GetCurrentValue>(refTypeIList0) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList0)), (object)source.GetCurrentValue>(refTypeList0) == null ? null : (List)((ValueComparer)((IProperty)refTypeList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList0)), (IEnumerable)source.GetCurrentValue(valueTypeArray0) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray0)), source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable0).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0)), (IEnumerable)source.GetCurrentValue>(valueTypeIList0) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList0)), (IEnumerable)source.GetCurrentValue>(valueTypeList0) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList0).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList0)), ((ValueComparer)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)((IProperty)enum10).GetValueComparer()).Snapshot(source.GetCurrentValue(enum10)), source.GetCurrentValue>(enum20) == null ? null : ((ValueComparer>)((IProperty)enum20).GetValueComparer()).Snapshot(source.GetCurrentValue>(enum20)), ((ValueComparer)((IProperty)flagsEnum10).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)((IProperty)flagsEnum20).GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum20))); - var entity2 = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg0, (ISnapshot)new Snapshot, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id0) == null ? null : ((ValueComparer>)((IProperty)id0).GetValueComparer()).Snapshot(source.GetCurrentValue>(id0)), (object)source.GetCurrentValue(refTypeArray1) == null ? null : (IPAddress[])((ValueComparer)((IProperty)refTypeArray1).GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray1)), (object)source.GetCurrentValue>(refTypeEnumerable1) == null ? null : (IEnumerable)((ValueComparer)((IProperty)refTypeEnumerable1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable1)), (object)source.GetCurrentValue>(refTypeIList1) == null ? null : (IList)((ValueComparer)((IProperty)refTypeIList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList1)), (object)source.GetCurrentValue>(refTypeList1) == null ? null : (List)((ValueComparer)((IProperty)refTypeList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList1)), (IEnumerable)source.GetCurrentValue(valueTypeArray1) == null ? null : (DateTime[])((ValueComparer>)((IProperty)valueTypeArray1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray1)), source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)((IProperty)valueTypeEnumerable1).GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1)), (IEnumerable)source.GetCurrentValue>(valueTypeIList1) == null ? null : (IList)((ValueComparer>)((IProperty)valueTypeIList1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList1)), (IEnumerable)source.GetCurrentValue>(valueTypeList1) == null ? null : (List)((ValueComparer>)((IProperty)valueTypeList1).GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList1))) }); + var entity1 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List, string, int, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), ((ValueComparer)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue(enum1)), (source.GetCurrentValue(enum2) == null ? null : ((ValueComparer)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue(enum2))), ((ValueComparer)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum2)), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), (((object)(source.GetCurrentValue(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue>(refTypeIList))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList))))))), (((object)(source.GetCurrentValue>(refTypeList))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray))))))), (source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList))))))), (source.GetCurrentValue(details) == null ? null : ((ValueComparer)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue(details))), ((ValueComparer)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue(number)), (((object)(source.GetCurrentValue(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray0))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable0))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue>(refTypeIList0))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList0))))))), (((object)(source.GetCurrentValue>(refTypeList0))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList0))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray0))))))), (source.GetCurrentValue>(valueTypeEnumerable0) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable0))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList0))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList0))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList0))))))), ((ValueComparer)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue(enum10)), (source.GetCurrentValue(enum20) == null ? null : ((ValueComparer)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue(enum20))), ((ValueComparer)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum10)), ((ValueComparer)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue(flagsEnum20))))); + var entity2 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg0, ((ISnapshot)(new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>((source.GetCurrentValue(id0) == null ? null : ((ValueComparer)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue(id0))), (((object)(source.GetCurrentValue(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue(refTypeArray1))))))), (((object)(source.GetCurrentValue>(refTypeEnumerable1))) == null ? null : ((IEnumerable)(((ValueComparer)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue>(refTypeIList1))) == null ? null : ((IList)(((ValueComparer)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeIList1))))))), (((object)(source.GetCurrentValue>(refTypeList1))) == null ? null : ((List)(((ValueComparer)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue>(refTypeList1))))))), (((IEnumerable)(source.GetCurrentValue(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue(valueTypeArray1))))))), (source.GetCurrentValue>(valueTypeEnumerable1) == null ? null : ((ValueComparer>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue>(valueTypeEnumerable1))), (((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))) == null ? null : ((IList)(((ValueComparer>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeIList1))))))), (((IEnumerable)(source.GetCurrentValue>(valueTypeList1))) == null ? null : ((List)(((ValueComparer>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable)(source.GetCurrentValue>(valueTypeList1)))))))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot, Nullable, string>(default(Nullable) == null ? null : ((ValueComparer>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable)), default(Nullable) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable)), default(string) == null ? null : ((ValueComparer)((IProperty)details).GetValueComparer()).Snapshot(default(string)))); + ISnapshot () => ((ISnapshot)(new Snapshot((default(long? ) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot, Nullable, string>(default(Nullable), default(Nullable), default(string))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long? ), default(long? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalBaseId") ? (Nullable)source["PrincipalBaseId"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot>(default(string), default(Nullable))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(string), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity3 = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - return (ISnapshot)new Snapshot, Nullable, object>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue>(id)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity3))); + var entity3 = ((CompiledModelTestBase.PrincipalDerived>)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))), (source.GetCurrentValue(principalBaseId) == null ? null : ((ValueComparer)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(principalBaseId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity3))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 39, @@ -106,7 +106,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) originalValueCount: 39, shadowCount: 2, relationshipCount: 3, - storeGeneratedCount: 3); + storeGeneratedCount: 2); Customize(runtimeEntityType); } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_provider_value_comparer/MyEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_provider_value_comparer/MyEntityEntityType.cs index 0079f18efc9..c59e42e3f69 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_provider_value_comparer/MyEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_provider_value_comparer/MyEntityEntityType.cs @@ -39,16 +39,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, providerPropertyType: typeof(int)); id.SetGetter( - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : (int)(((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null), - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : (int)(((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null), - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); + int (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : ((int)((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, + int (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : ((int)((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); id.SetSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetMaterializationSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetAccessors( - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -57,26 +57,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null) == null) { return entry.ReadTemporaryValue(0); } else { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -85,23 +85,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetProviderValueComparer(new ValueComparer( - (int l, int r) => false, - (int v) => 0, - (int v) => 1)); + bool (int l, int r) => false, + int (int v) => 0, + int (int v) => 1)); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); var key = runtimeEntityType.AddKey( @@ -118,24 +118,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_type_mapping/MyEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_type_mapping/MyEntityEntityType.cs index b8e10fd25c8..92cf6b3178e 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_type_mapping/MyEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_type_mapping/MyEntityEntityType.cs @@ -38,16 +38,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : (int)(((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null), - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : (int)(((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null), - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); + int (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : ((int)((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, + int (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : ((int)((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); id.SetSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetMaterializationSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetAccessors( - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -56,26 +56,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null) == null) { return entry.ReadTemporaryValue(0); } else { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -84,17 +84,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); @@ -113,24 +113,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_comparer/MyEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_comparer/MyEntityEntityType.cs index 499a726fdaa..e21509b6721 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_comparer/MyEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_comparer/MyEntityEntityType.cs @@ -39,16 +39,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, providerPropertyType: typeof(int)); id.SetGetter( - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : (int)(((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null), - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : (int)(((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null), - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); + int (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : ((int)((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, + int (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : ((int)((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); id.SetSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetMaterializationSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetAccessors( - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -57,26 +57,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null) == null) { return entry.ReadTemporaryValue(0); } else { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -85,23 +85,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetValueComparer(new ValueComparer( - (int l, int r) => false, - (int v) => 0, - (int v) => 1)); + bool (int l, int r) => false, + int (int v) => 0, + int (int v) => 1)); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); var key = runtimeEntityType.AddKey( @@ -118,24 +118,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_converter/MyEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_converter/MyEntityEntityType.cs index c728e94a8fb..c80a2ad312f 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_converter/MyEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Custom_value_converter/MyEntityEntityType.cs @@ -39,16 +39,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : (int)(((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null), - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : (int)(((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null), - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); + int (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : ((int)((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, + int (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : ((int)((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); id.SetSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetMaterializationSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetAccessors( - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -57,26 +57,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null) == null) { return entry.ReadTemporaryValue(0); } else { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -85,25 +85,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter( - (int i) => i, - (int i) => i), + int (int i) => i, + int (int i) => i), jsonValueReaderWriter: new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( - (int i) => i, - (int i) => i))); + int (int i) => i, + int (int i) => i))); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); var key = runtimeEntityType.AddKey( @@ -120,24 +120,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUser0EntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUser0EntityType.cs index 903857677c9..830560ca502 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUser0EntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUser0EntityType.cs @@ -49,24 +49,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var twoFactorEnabled = runtimeEntityType.FindProperty("TwoFactorEnabled")!; var userName = runtimeEntityType.FindProperty("UserName")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.IdentityUser)source.Entity; - return (ISnapshot)new Snapshot, string, string, string, string, bool, string, bool, string>(source.GetCurrentValue(id) == null ? null : ((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)((IProperty)accessFailedCount).GetValueComparer()).Snapshot(source.GetCurrentValue(accessFailedCount)), source.GetCurrentValue(concurrencyStamp) == null ? null : ((ValueComparer)((IProperty)concurrencyStamp).GetValueComparer()).Snapshot(source.GetCurrentValue(concurrencyStamp)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), source.GetCurrentValue(email) == null ? null : ((ValueComparer)((IProperty)email).GetValueComparer()).Snapshot(source.GetCurrentValue(email)), ((ValueComparer)((IProperty)emailConfirmed).GetValueComparer()).Snapshot(source.GetCurrentValue(emailConfirmed)), ((ValueComparer)((IProperty)lockoutEnabled).GetValueComparer()).Snapshot(source.GetCurrentValue(lockoutEnabled)), source.GetCurrentValue>(lockoutEnd) == null ? null : ((ValueComparer>)((IProperty)lockoutEnd).GetValueComparer()).Snapshot(source.GetCurrentValue>(lockoutEnd)), source.GetCurrentValue(normalizedEmail) == null ? null : ((ValueComparer)((IProperty)normalizedEmail).GetValueComparer()).Snapshot(source.GetCurrentValue(normalizedEmail)), source.GetCurrentValue(normalizedUserName) == null ? null : ((ValueComparer)((IProperty)normalizedUserName).GetValueComparer()).Snapshot(source.GetCurrentValue(normalizedUserName)), source.GetCurrentValue(passwordHash) == null ? null : ((ValueComparer)((IProperty)passwordHash).GetValueComparer()).Snapshot(source.GetCurrentValue(passwordHash)), source.GetCurrentValue(phoneNumber) == null ? null : ((ValueComparer)((IProperty)phoneNumber).GetValueComparer()).Snapshot(source.GetCurrentValue(phoneNumber)), ((ValueComparer)((IProperty)phoneNumberConfirmed).GetValueComparer()).Snapshot(source.GetCurrentValue(phoneNumberConfirmed)), source.GetCurrentValue(securityStamp) == null ? null : ((ValueComparer)((IProperty)securityStamp).GetValueComparer()).Snapshot(source.GetCurrentValue(securityStamp)), ((ValueComparer)((IProperty)twoFactorEnabled).GetValueComparer()).Snapshot(source.GetCurrentValue(twoFactorEnabled)), source.GetCurrentValue(userName) == null ? null : ((ValueComparer)((IProperty)userName).GetValueComparer()).Snapshot(source.GetCurrentValue(userName))); + var entity = ((CompiledModelInMemoryTest.IdentityUser)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)accessFailedCount).GetValueComparer())).Snapshot(source.GetCurrentValue(accessFailedCount)), (source.GetCurrentValue(concurrencyStamp) == null ? null : ((ValueComparer)(((IProperty)concurrencyStamp).GetValueComparer())).Snapshot(source.GetCurrentValue(concurrencyStamp))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), (source.GetCurrentValue(email) == null ? null : ((ValueComparer)(((IProperty)email).GetValueComparer())).Snapshot(source.GetCurrentValue(email))), ((ValueComparer)(((IProperty)emailConfirmed).GetValueComparer())).Snapshot(source.GetCurrentValue(emailConfirmed)), ((ValueComparer)(((IProperty)lockoutEnabled).GetValueComparer())).Snapshot(source.GetCurrentValue(lockoutEnabled)), (source.GetCurrentValue(lockoutEnd) == null ? null : ((ValueComparer)(((IProperty)lockoutEnd).GetValueComparer())).Snapshot(source.GetCurrentValue(lockoutEnd))), (source.GetCurrentValue(normalizedEmail) == null ? null : ((ValueComparer)(((IProperty)normalizedEmail).GetValueComparer())).Snapshot(source.GetCurrentValue(normalizedEmail))), (source.GetCurrentValue(normalizedUserName) == null ? null : ((ValueComparer)(((IProperty)normalizedUserName).GetValueComparer())).Snapshot(source.GetCurrentValue(normalizedUserName))), (source.GetCurrentValue(passwordHash) == null ? null : ((ValueComparer)(((IProperty)passwordHash).GetValueComparer())).Snapshot(source.GetCurrentValue(passwordHash))), (source.GetCurrentValue(phoneNumber) == null ? null : ((ValueComparer)(((IProperty)phoneNumber).GetValueComparer())).Snapshot(source.GetCurrentValue(phoneNumber))), ((ValueComparer)(((IProperty)phoneNumberConfirmed).GetValueComparer())).Snapshot(source.GetCurrentValue(phoneNumberConfirmed)), (source.GetCurrentValue(securityStamp) == null ? null : ((ValueComparer)(((IProperty)securityStamp).GetValueComparer())).Snapshot(source.GetCurrentValue(securityStamp))), ((ValueComparer)(((IProperty)twoFactorEnabled).GetValueComparer())).Snapshot(source.GetCurrentValue(twoFactorEnabled)), (source.GetCurrentValue(userName) == null ? null : ((ValueComparer)(((IProperty)userName).GetValueComparer())).Snapshot(source.GetCurrentValue(userName)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot(default(string))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(string))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.IdentityUser)source.Entity; - return (ISnapshot)new Snapshot(source.GetCurrentValue(id) == null ? null : ((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((CompiledModelInMemoryTest.IdentityUser)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 16, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserEntityType.cs index 41b8e35f651..82f4aa907d2 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -41,20 +40,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.Id(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.Id(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.Id(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.Id(instance) == null); id.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.Id(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.Id(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + string (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -63,21 +62,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id", "Scaffolding") }); var accessFailedCount = runtimeEntityType.AddProperty( "AccessFailedCount", @@ -86,20 +84,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); accessFailedCount.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(entity) == 0, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(instance) == 0); + int (IdentityUser entity) => IdentityUserUnsafeAccessors.AccessFailedCount(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.AccessFailedCount(entity) == 0, + int (IdentityUser instance) => IdentityUserUnsafeAccessors.AccessFailedCount(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.AccessFailedCount(instance) == 0); accessFailedCount.SetSetter( - (IdentityUser entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(entity) = value); + (IdentityUser entity, int value) => IdentityUserUnsafeAccessors.AccessFailedCount(entity) = value); accessFailedCount.SetMaterializationSetter( - (IdentityUser entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(entity) = value); + (IdentityUser entity, int value) => IdentityUserUnsafeAccessors.AccessFailedCount(entity) = value); accessFailedCount.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(accessFailedCount, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue(accessFailedCount), - (ValueBuffer valueBuffer) => valueBuffer[1]); + int (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.AccessFailedCount(((IdentityUser)(entry.Entity))), + int (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.AccessFailedCount(((IdentityUser)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(accessFailedCount, 1), + int (InternalEntityEntry entry) => entry.GetCurrentValue(accessFailedCount), + object (ValueBuffer valueBuffer) => valueBuffer[1]); accessFailedCount.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -108,20 +106,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); accessFailedCount.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); - accessFailedCount.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount", "Scaffolding") }); var concurrencyStamp = runtimeEntityType.AddProperty( "ConcurrencyStamp", @@ -130,20 +127,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); concurrencyStamp.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.ConcurrencyStamp(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.ConcurrencyStamp(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.ConcurrencyStamp(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.ConcurrencyStamp(instance) == null); concurrencyStamp.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.ConcurrencyStamp(entity) = value); concurrencyStamp.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.ConcurrencyStamp(entity) = value); concurrencyStamp.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(concurrencyStamp, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue(concurrencyStamp), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.ConcurrencyStamp(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.ConcurrencyStamp(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(concurrencyStamp, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue(concurrencyStamp), + object (ValueBuffer valueBuffer) => valueBuffer[2]); concurrencyStamp.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -152,20 +149,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); concurrencyStamp.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - concurrencyStamp.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp", "Scaffolding") }); var discriminator = runtimeEntityType.AddProperty( "Discriminator", @@ -173,11 +169,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(discriminator, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[3]); discriminator.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -186,17 +182,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); @@ -207,20 +203,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); email.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.Email(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.Email(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.Email(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.Email(instance) == null); email.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.Email(entity) = value); email.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.Email(entity) = value); email.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(email, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue(email), - (ValueBuffer valueBuffer) => valueBuffer[4]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.Email(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.Email(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(email, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue(email), + object (ValueBuffer valueBuffer) => valueBuffer[4]); email.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -229,20 +225,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); email.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - email.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email", "Scaffolding") }); var emailConfirmed = runtimeEntityType.AddProperty( "EmailConfirmed", @@ -251,20 +246,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); emailConfirmed.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(entity) == false, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(instance) == false); + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.EmailConfirmed(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.EmailConfirmed(entity) == false, + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.EmailConfirmed(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.EmailConfirmed(instance) == false); emailConfirmed.SetSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.EmailConfirmed(entity) = value); emailConfirmed.SetMaterializationSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.EmailConfirmed(entity) = value); emailConfirmed.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(emailConfirmed, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue(emailConfirmed), - (ValueBuffer valueBuffer) => valueBuffer[5]); + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.EmailConfirmed(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.EmailConfirmed(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(emailConfirmed, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(emailConfirmed), + object (ValueBuffer valueBuffer) => valueBuffer[5]); emailConfirmed.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -273,20 +268,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); emailConfirmed.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), clrType: typeof(bool), jsonValueReaderWriter: JsonBoolReaderWriter.Instance); - emailConfirmed.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed", "Scaffolding") }); var lockoutEnabled = runtimeEntityType.AddProperty( "LockoutEnabled", @@ -295,20 +289,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); lockoutEnabled.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(entity) == false, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(instance) == false); + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.LockoutEnabled(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.LockoutEnabled(entity) == false, + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.LockoutEnabled(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.LockoutEnabled(instance) == false); lockoutEnabled.SetSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.LockoutEnabled(entity) = value); lockoutEnabled.SetMaterializationSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.LockoutEnabled(entity) = value); lockoutEnabled.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(lockoutEnabled, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue(lockoutEnabled), - (ValueBuffer valueBuffer) => valueBuffer[6]); + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.LockoutEnabled(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.LockoutEnabled(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(lockoutEnabled, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(lockoutEnabled), + object (ValueBuffer valueBuffer) => valueBuffer[6]); lockoutEnabled.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -317,20 +311,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); lockoutEnabled.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), clrType: typeof(bool), jsonValueReaderWriter: JsonBoolReaderWriter.Instance); - lockoutEnabled.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled", "Scaffolding") }); var lockoutEnd = runtimeEntityType.AddProperty( "LockoutEnd", @@ -339,20 +332,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); lockoutEnd.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(entity), - (IdentityUser entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(entity).HasValue, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(instance), - (IdentityUser instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(instance).HasValue); + DateTimeOffset? (IdentityUser entity) => IdentityUserUnsafeAccessors.LockoutEnd(entity), + bool (IdentityUser entity) => !(IdentityUserUnsafeAccessors.LockoutEnd(entity).HasValue), + DateTimeOffset? (IdentityUser instance) => IdentityUserUnsafeAccessors.LockoutEnd(instance), + bool (IdentityUser instance) => !(IdentityUserUnsafeAccessors.LockoutEnd(instance).HasValue)); lockoutEnd.SetSetter( - (IdentityUser entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(entity) = value); + (IdentityUser entity, DateTimeOffset? value) => IdentityUserUnsafeAccessors.LockoutEnd(entity) = value); lockoutEnd.SetMaterializationSetter( - (IdentityUser entity, Nullable value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(entity) = value); + (IdentityUser entity, DateTimeOffset? value) => IdentityUserUnsafeAccessors.LockoutEnd(entity) = value); lockoutEnd.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(lockoutEnd, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue>(lockoutEnd), - (ValueBuffer valueBuffer) => valueBuffer[7]); + DateTimeOffset? (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.LockoutEnd(((IdentityUser)(entry.Entity))), + DateTimeOffset? (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.LockoutEnd(((IdentityUser)(entry.Entity))), + DateTimeOffset? (InternalEntityEntry entry) => entry.ReadOriginalValue(lockoutEnd, 7), + DateTimeOffset? (InternalEntityEntry entry) => entry.GetCurrentValue(lockoutEnd), + object (ValueBuffer valueBuffer) => valueBuffer[7]); lockoutEnd.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -361,22 +354,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); lockoutEnd.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), clrType: typeof(DateTimeOffset), jsonValueReaderWriter: JsonDateTimeOffsetReaderWriter.Instance); lockoutEnd.SetValueComparer(new NullableValueComparer(lockoutEnd.TypeMapping.Comparer)); lockoutEnd.SetKeyValueComparer(new NullableValueComparer(lockoutEnd.TypeMapping.KeyComparer)); - lockoutEnd.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd", "Scaffolding") }); var normalizedEmail = runtimeEntityType.AddProperty( "NormalizedEmail", @@ -385,20 +377,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); normalizedEmail.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.NormalizedEmail(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.NormalizedEmail(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.NormalizedEmail(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.NormalizedEmail(instance) == null); normalizedEmail.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.NormalizedEmail(entity) = value); normalizedEmail.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.NormalizedEmail(entity) = value); normalizedEmail.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(normalizedEmail, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue(normalizedEmail), - (ValueBuffer valueBuffer) => valueBuffer[8]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.NormalizedEmail(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.NormalizedEmail(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(normalizedEmail, 8), + string (InternalEntityEntry entry) => entry.GetCurrentValue(normalizedEmail), + object (ValueBuffer valueBuffer) => valueBuffer[8]); normalizedEmail.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -407,20 +399,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); normalizedEmail.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - normalizedEmail.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail", "Scaffolding") }); var normalizedUserName = runtimeEntityType.AddProperty( "NormalizedUserName", @@ -429,20 +420,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); normalizedUserName.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.NormalizedUserName(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.NormalizedUserName(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.NormalizedUserName(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.NormalizedUserName(instance) == null); normalizedUserName.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.NormalizedUserName(entity) = value); normalizedUserName.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.NormalizedUserName(entity) = value); normalizedUserName.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(normalizedUserName, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue(normalizedUserName), - (ValueBuffer valueBuffer) => valueBuffer[9]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.NormalizedUserName(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.NormalizedUserName(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(normalizedUserName, 9), + string (InternalEntityEntry entry) => entry.GetCurrentValue(normalizedUserName), + object (ValueBuffer valueBuffer) => valueBuffer[9]); normalizedUserName.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -451,20 +442,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); normalizedUserName.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - normalizedUserName.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName", "Scaffolding") }); var passwordHash = runtimeEntityType.AddProperty( "PasswordHash", @@ -473,20 +463,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); passwordHash.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.PasswordHash(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.PasswordHash(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.PasswordHash(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.PasswordHash(instance) == null); passwordHash.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.PasswordHash(entity) = value); passwordHash.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.PasswordHash(entity) = value); passwordHash.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(passwordHash, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue(passwordHash), - (ValueBuffer valueBuffer) => valueBuffer[10]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PasswordHash(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PasswordHash(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(passwordHash, 10), + string (InternalEntityEntry entry) => entry.GetCurrentValue(passwordHash), + object (ValueBuffer valueBuffer) => valueBuffer[10]); passwordHash.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -495,20 +485,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); passwordHash.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - passwordHash.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash", "Scaffolding") }); var phoneNumber = runtimeEntityType.AddProperty( "PhoneNumber", @@ -517,20 +506,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); phoneNumber.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.PhoneNumber(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.PhoneNumber(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.PhoneNumber(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.PhoneNumber(instance) == null); phoneNumber.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.PhoneNumber(entity) = value); phoneNumber.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.PhoneNumber(entity) = value); phoneNumber.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(phoneNumber, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue(phoneNumber), - (ValueBuffer valueBuffer) => valueBuffer[11]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PhoneNumber(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PhoneNumber(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(phoneNumber, 11), + string (InternalEntityEntry entry) => entry.GetCurrentValue(phoneNumber), + object (ValueBuffer valueBuffer) => valueBuffer[11]); phoneNumber.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -539,20 +528,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); phoneNumber.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - phoneNumber.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber", "Scaffolding") }); var phoneNumberConfirmed = runtimeEntityType.AddProperty( "PhoneNumberConfirmed", @@ -561,20 +549,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); phoneNumberConfirmed.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(entity) == false, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(instance) == false); + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(entity) == false, + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(instance) == false); phoneNumberConfirmed.SetSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(entity) = value); phoneNumberConfirmed.SetMaterializationSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(entity) = value); phoneNumberConfirmed.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(phoneNumberConfirmed, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue(phoneNumberConfirmed), - (ValueBuffer valueBuffer) => valueBuffer[12]); + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.PhoneNumberConfirmed(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(phoneNumberConfirmed, 12), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(phoneNumberConfirmed), + object (ValueBuffer valueBuffer) => valueBuffer[12]); phoneNumberConfirmed.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -583,20 +571,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); phoneNumberConfirmed.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), clrType: typeof(bool), jsonValueReaderWriter: JsonBoolReaderWriter.Instance); - phoneNumberConfirmed.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed", "Scaffolding") }); var securityStamp = runtimeEntityType.AddProperty( "SecurityStamp", @@ -605,20 +592,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); securityStamp.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.SecurityStamp(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.SecurityStamp(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.SecurityStamp(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.SecurityStamp(instance) == null); securityStamp.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.SecurityStamp(entity) = value); securityStamp.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.SecurityStamp(entity) = value); securityStamp.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(securityStamp, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue(securityStamp), - (ValueBuffer valueBuffer) => valueBuffer[13]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.SecurityStamp(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.SecurityStamp(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(securityStamp, 13), + string (InternalEntityEntry entry) => entry.GetCurrentValue(securityStamp), + object (ValueBuffer valueBuffer) => valueBuffer[13]); securityStamp.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -627,20 +614,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); securityStamp.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - securityStamp.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp", "Scaffolding") }); var twoFactorEnabled = runtimeEntityType.AddProperty( "TwoFactorEnabled", @@ -649,20 +635,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); twoFactorEnabled.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(entity) == false, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(instance) == false); + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.TwoFactorEnabled(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.TwoFactorEnabled(entity) == false, + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.TwoFactorEnabled(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.TwoFactorEnabled(instance) == false); twoFactorEnabled.SetSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.TwoFactorEnabled(entity) = value); twoFactorEnabled.SetMaterializationSetter( - (IdentityUser entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(entity) = value); + (IdentityUser entity, bool value) => IdentityUserUnsafeAccessors.TwoFactorEnabled(entity) = value); twoFactorEnabled.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(twoFactorEnabled, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue(twoFactorEnabled), - (ValueBuffer valueBuffer) => valueBuffer[14]); + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.TwoFactorEnabled(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.TwoFactorEnabled(((IdentityUser)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue(twoFactorEnabled, 14), + bool (InternalEntityEntry entry) => entry.GetCurrentValue(twoFactorEnabled), + object (ValueBuffer valueBuffer) => valueBuffer[14]); twoFactorEnabled.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -671,20 +657,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); twoFactorEnabled.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), clrType: typeof(bool), jsonValueReaderWriter: JsonBoolReaderWriter.Instance); - twoFactorEnabled.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled", "Scaffolding") }); var userName = runtimeEntityType.AddProperty( "UserName", @@ -693,20 +678,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(IdentityUser).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); userName.SetGetter( - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(entity), - (IdentityUser entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(entity) == null, - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(instance), - (IdentityUser instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(instance) == null); + string (IdentityUser entity) => IdentityUserUnsafeAccessors.UserName(entity), + bool (IdentityUser entity) => IdentityUserUnsafeAccessors.UserName(entity) == null, + string (IdentityUser instance) => IdentityUserUnsafeAccessors.UserName(instance), + bool (IdentityUser instance) => IdentityUserUnsafeAccessors.UserName(instance) == null); userName.SetSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.UserName(entity) = value); userName.SetMaterializationSetter( - (IdentityUser entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(entity) = value); + (IdentityUser entity, string value) => IdentityUserUnsafeAccessors.UserName(entity) = value); userName.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName((IdentityUser)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(userName, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue(userName), - (ValueBuffer valueBuffer) => valueBuffer[15]); + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.UserName(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => IdentityUserUnsafeAccessors.UserName(((IdentityUser)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(userName, 15), + string (InternalEntityEntry entry) => entry.GetCurrentValue(userName), + object (ValueBuffer valueBuffer) => valueBuffer[15]); userName.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -715,20 +700,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); userName.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - userName.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IdentityUserEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName", "Scaffolding") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -759,24 +743,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (IdentityUser)source.Entity; - return (ISnapshot)new Snapshot, string, string, string, string, bool, string, bool, string>(source.GetCurrentValue(id) == null ? null : ((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)((IProperty)accessFailedCount).GetValueComparer()).Snapshot(source.GetCurrentValue(accessFailedCount)), source.GetCurrentValue(concurrencyStamp) == null ? null : ((ValueComparer)((IProperty)concurrencyStamp).GetValueComparer()).Snapshot(source.GetCurrentValue(concurrencyStamp)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), source.GetCurrentValue(email) == null ? null : ((ValueComparer)((IProperty)email).GetValueComparer()).Snapshot(source.GetCurrentValue(email)), ((ValueComparer)((IProperty)emailConfirmed).GetValueComparer()).Snapshot(source.GetCurrentValue(emailConfirmed)), ((ValueComparer)((IProperty)lockoutEnabled).GetValueComparer()).Snapshot(source.GetCurrentValue(lockoutEnabled)), source.GetCurrentValue>(lockoutEnd) == null ? null : ((ValueComparer>)((IProperty)lockoutEnd).GetValueComparer()).Snapshot(source.GetCurrentValue>(lockoutEnd)), source.GetCurrentValue(normalizedEmail) == null ? null : ((ValueComparer)((IProperty)normalizedEmail).GetValueComparer()).Snapshot(source.GetCurrentValue(normalizedEmail)), source.GetCurrentValue(normalizedUserName) == null ? null : ((ValueComparer)((IProperty)normalizedUserName).GetValueComparer()).Snapshot(source.GetCurrentValue(normalizedUserName)), source.GetCurrentValue(passwordHash) == null ? null : ((ValueComparer)((IProperty)passwordHash).GetValueComparer()).Snapshot(source.GetCurrentValue(passwordHash)), source.GetCurrentValue(phoneNumber) == null ? null : ((ValueComparer)((IProperty)phoneNumber).GetValueComparer()).Snapshot(source.GetCurrentValue(phoneNumber)), ((ValueComparer)((IProperty)phoneNumberConfirmed).GetValueComparer()).Snapshot(source.GetCurrentValue(phoneNumberConfirmed)), source.GetCurrentValue(securityStamp) == null ? null : ((ValueComparer)((IProperty)securityStamp).GetValueComparer()).Snapshot(source.GetCurrentValue(securityStamp)), ((ValueComparer)((IProperty)twoFactorEnabled).GetValueComparer()).Snapshot(source.GetCurrentValue(twoFactorEnabled)), source.GetCurrentValue(userName) == null ? null : ((ValueComparer)((IProperty)userName).GetValueComparer()).Snapshot(source.GetCurrentValue(userName))); + var entity = ((IdentityUser)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))), ((ValueComparer)(((IProperty)accessFailedCount).GetValueComparer())).Snapshot(source.GetCurrentValue(accessFailedCount)), (source.GetCurrentValue(concurrencyStamp) == null ? null : ((ValueComparer)(((IProperty)concurrencyStamp).GetValueComparer())).Snapshot(source.GetCurrentValue(concurrencyStamp))), (source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue(discriminator))), (source.GetCurrentValue(email) == null ? null : ((ValueComparer)(((IProperty)email).GetValueComparer())).Snapshot(source.GetCurrentValue(email))), ((ValueComparer)(((IProperty)emailConfirmed).GetValueComparer())).Snapshot(source.GetCurrentValue(emailConfirmed)), ((ValueComparer)(((IProperty)lockoutEnabled).GetValueComparer())).Snapshot(source.GetCurrentValue(lockoutEnabled)), (source.GetCurrentValue(lockoutEnd) == null ? null : ((ValueComparer)(((IProperty)lockoutEnd).GetValueComparer())).Snapshot(source.GetCurrentValue(lockoutEnd))), (source.GetCurrentValue(normalizedEmail) == null ? null : ((ValueComparer)(((IProperty)normalizedEmail).GetValueComparer())).Snapshot(source.GetCurrentValue(normalizedEmail))), (source.GetCurrentValue(normalizedUserName) == null ? null : ((ValueComparer)(((IProperty)normalizedUserName).GetValueComparer())).Snapshot(source.GetCurrentValue(normalizedUserName))), (source.GetCurrentValue(passwordHash) == null ? null : ((ValueComparer)(((IProperty)passwordHash).GetValueComparer())).Snapshot(source.GetCurrentValue(passwordHash))), (source.GetCurrentValue(phoneNumber) == null ? null : ((ValueComparer)(((IProperty)phoneNumber).GetValueComparer())).Snapshot(source.GetCurrentValue(phoneNumber))), ((ValueComparer)(((IProperty)phoneNumberConfirmed).GetValueComparer())).Snapshot(source.GetCurrentValue(phoneNumberConfirmed)), (source.GetCurrentValue(securityStamp) == null ? null : ((ValueComparer)(((IProperty)securityStamp).GetValueComparer())).Snapshot(source.GetCurrentValue(securityStamp))), ((ValueComparer)(((IProperty)twoFactorEnabled).GetValueComparer())).Snapshot(source.GetCurrentValue(twoFactorEnabled)), (source.GetCurrentValue(userName) == null ? null : ((ValueComparer)(((IProperty)userName).GetValueComparer())).Snapshot(source.GetCurrentValue(userName)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => (ISnapshot)new Snapshot(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null)); + ISnapshot (IDictionary source) => ((ISnapshot)(new Snapshot((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot(default(string))); + ISnapshot () => ((ISnapshot)(new Snapshot(default(string))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (IdentityUser)source.Entity; - return (ISnapshot)new Snapshot(source.GetCurrentValue(id) == null ? null : ((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((IdentityUser)(source.Entity)); + return ((ISnapshot)(new Snapshot((source.GetCurrentValue(id) == null ? null : ((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 16, @@ -791,50 +775,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Id(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_AccessFailedCount(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_ConcurrencyStamp(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_Email(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_EmailConfirmed(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnabled(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref DateTimeOffset? UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_LockoutEnd(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedEmail(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_NormalizedUserName(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PasswordHash(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumber(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_PhoneNumberConfirmed(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_SecurityStamp(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_TwoFactorEnabled(IdentityUser @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_TestModels_AspNetIdentity_IdentityUser1_UserName(IdentityUser @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserUnsafeAccessors.cs new file mode 100644 index 00000000000..28babb0588f --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IdentityUserUnsafeAccessors.cs @@ -0,0 +1,59 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.TestModels.AspNetIdentity; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace Scaffolding +{ + public static class IdentityUserUnsafeAccessors + where TKey : IEquatable + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref TKey Id(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int AccessFailedCount(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string ConcurrencyStamp(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string Email(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool EmailConfirmed(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool LockoutEnabled(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref DateTimeOffset? LockoutEnd(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string NormalizedEmail(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string NormalizedUserName(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string PasswordHash(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string PhoneNumber(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool PhoneNumberConfirmed(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string SecurityStamp(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref bool TwoFactorEnabled(IdentityUser @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string UserName(IdentityUser @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexEntityType.cs index 5592f0f146e..466e1d8164a 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); id.SetGetter( - (CompiledModelInMemoryTest.Index entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(entity), - (CompiledModelInMemoryTest.Index entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelInMemoryTest.Index instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(instance), - (CompiledModelInMemoryTest.Index instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelInMemoryTest.Index entity) => IndexUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.Index entity) => IndexUnsafeAccessors.Id(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelInMemoryTest.Index instance) => IndexUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.Index instance) => IndexUnsafeAccessors.Id(instance) == new Guid("00000000-0000-0000-0000-000000000000")); id.SetSetter( - (CompiledModelInMemoryTest.Index entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(entity) = value); + (CompiledModelInMemoryTest.Index entity, Guid value) => IndexUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.Index entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(entity) = value); + (CompiledModelInMemoryTest.Index entity, Guid value) => IndexUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id((CompiledModelInMemoryTest.Index)entry.Entity) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id((CompiledModelInMemoryTest.Index)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id((CompiledModelInMemoryTest.Index)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && IndexUnsafeAccessors.Id(((CompiledModelInMemoryTest.Index)(entry.Entity))) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue(0) : IndexUnsafeAccessors.Id(((CompiledModelInMemoryTest.Index)(entry.Entity))))), + Guid (InternalEntityEntry entry) => IndexUnsafeAccessors.Id(((CompiledModelInMemoryTest.Index)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -61,21 +60,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), clrType: typeof(Guid), jsonValueReaderWriter: JsonGuidReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("IndexEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id", "Scaffolding") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -91,24 +89,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.Index)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((CompiledModelInMemoryTest.Index)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.Index)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((CompiledModelInMemoryTest.Index)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, @@ -123,8 +121,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Index_Id(CompiledModelInMemoryTest.Index @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexUnsafeAccessors.cs new file mode 100644 index 00000000000..897c50ae752 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/IndexUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace Scaffolding +{ + public static class IndexUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref Guid Id(CompiledModelInMemoryTest.Index @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingEntityType.cs index 8c0141f0e89..470db067450 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); id.SetGetter( - (CompiledModelInMemoryTest.Scaffolding entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(entity), - (CompiledModelInMemoryTest.Scaffolding entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(entity) == 0L, - (CompiledModelInMemoryTest.Scaffolding instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(instance), - (CompiledModelInMemoryTest.Scaffolding instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(instance) == 0L); + long (CompiledModelInMemoryTest.Scaffolding entity) => ScaffoldingUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.Scaffolding entity) => ScaffoldingUnsafeAccessors.Id(entity) == 0L, + long (CompiledModelInMemoryTest.Scaffolding instance) => ScaffoldingUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.Scaffolding instance) => ScaffoldingUnsafeAccessors.Id(instance) == 0L); id.SetSetter( - (CompiledModelInMemoryTest.Scaffolding entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(entity) = value); + (CompiledModelInMemoryTest.Scaffolding entity, long value) => ScaffoldingUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.Scaffolding entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(entity) = value); + (CompiledModelInMemoryTest.Scaffolding entity, long value) => ScaffoldingUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id((CompiledModelInMemoryTest.Scaffolding)entry.Entity) == 0L ? entry.ReadTemporaryValue(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id((CompiledModelInMemoryTest.Scaffolding)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id((CompiledModelInMemoryTest.Scaffolding)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(0) && ScaffoldingUnsafeAccessors.Id(((CompiledModelInMemoryTest.Scaffolding)(entry.Entity))) == 0L ? entry.ReadTemporaryValue(0) : ScaffoldingUnsafeAccessors.Id(((CompiledModelInMemoryTest.Scaffolding)(entry.Entity))))), + long (InternalEntityEntry entry) => ScaffoldingUnsafeAccessors.Id(((CompiledModelInMemoryTest.Scaffolding)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -61,21 +60,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ScaffoldingEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id", "Scaffolding") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -91,24 +89,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.Scaffolding)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((CompiledModelInMemoryTest.Scaffolding)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(long)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(long)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(long))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(long))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.Scaffolding)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((CompiledModelInMemoryTest.Scaffolding)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, @@ -123,8 +121,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Scaffolding_Id(CompiledModelInMemoryTest.Scaffolding @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingUnsafeAccessors.cs new file mode 100644 index 00000000000..6538232948c --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Fully_qualified_model/ScaffoldingUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace Scaffolding +{ + public static class ScaffoldingUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref long Id(CompiledModelInMemoryTest.Scaffolding @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Global_namespace/EntityType1.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Global_namespace/EntityType1.cs index a1ef1e36f39..75a3cbd93db 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Global_namespace/EntityType1.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Global_namespace/EntityType1.cs @@ -36,16 +36,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : (int)(((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null), - (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : (int)(((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null), - (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); + int (Dictionary entity) => ((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null ? 0 : ((int)((((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null)))), + bool (Dictionary entity) => (((IDictionary)entity).ContainsKey("Id") ? entity["Id"] : null) == null, + int (Dictionary instance) => ((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null ? 0 : ((int)((((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null)))), + bool (Dictionary instance) => (((IDictionary)instance).ContainsKey("Id") ? instance["Id"] : null) == null); id.SetSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetMaterializationSetter( - (Dictionary entity, int value) => entity["Id"] = (object)value); + (Dictionary entity, int value) => entity["Id"] = ((object)(value))); id.SetAccessors( - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -54,26 +54,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null) == null) { return entry.ReadTemporaryValue(0); } else { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + int (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary)(Dictionary)entry.Entity).ContainsKey("Id") ? ((Dictionary)entry.Entity)["Id"] : null; - return nullableValue == null ? default(int) : (int)nullableValue; + var nullableValue = (((IDictionary)((Dictionary)(entry.Entity))).ContainsKey("Id") ? ((Dictionary)(entry.Entity))["Id"] : null); + return (nullableValue == null ? default(int) : ((int)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -82,17 +82,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); @@ -111,24 +111,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (Dictionary)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); + var entity = ((Dictionary)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3EntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3EntityType.cs index f4af351d1b8..5cb4d36fa9c 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3EntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3EntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -40,20 +39,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, int value) => LazyProxiesEntity3UnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, int value) => LazyProxiesEntity3UnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), + int (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -62,21 +61,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id", "TestNamespace") }); var name = runtimeEntityType.AddProperty( "Name", @@ -85,20 +83,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelInMemoryTest.LazyProxiesEntity3).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); name.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(instance) == null); + string (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors.Name(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors.Name(entity) == null, + string (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors.Name(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors.Name(instance) == null); name.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, string value) => LazyProxiesEntity3UnsafeAccessors.Name(entity) = value); name.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, string value) => LazyProxiesEntity3UnsafeAccessors.Name(entity) = value); name.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(name, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue(name), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors.Name(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), + string (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors.Name(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(name, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue(name), + object (ValueBuffer valueBuffer) => valueBuffer[1]); name.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -107,20 +105,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); name.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - name.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name", "TestNamespace") }); var lazyLoader = runtimeEntityType.AddServiceProperty( "LazyLoader", @@ -149,24 +146,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory(key)); var collectionNavigation = runtimeEntityType.FindNavigation("CollectionNavigation")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity3)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(name) == null ? null : ((ValueComparer)((IProperty)name).GetValueComparer()).Snapshot(source.GetCurrentValue(name))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity3)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue(id)), (source.GetCurrentValue(name) == null ? null : ((ValueComparer)(((IProperty)name).GetValueComparer())).Snapshot(source.GetCurrentValue(name)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary source) => Snapshot.Empty); + ISnapshot (IDictionary source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity3)source.Entity; - return (ISnapshot)new Snapshot(((ValueComparer)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity3)(source.Entity)); + return ((ISnapshot)(new Snapshot(((ValueComparer)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue(id)), SnapshotFactoryFactory.SnapshotCollection(LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -181,14 +178,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Id(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3_Name(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_collectionNavigation")] - public static extern ref ICollection UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3UnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3UnsafeAccessors.cs new file mode 100644 index 00000000000..caaa4e0a683 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity3UnsafeAccessors.cs @@ -0,0 +1,23 @@ +// +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyProxiesEntity3UnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + public static extern ref string Name(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_collectionNavigation")] + public static extern ref ICollection _collectionNavigation(CompiledModelInMemoryTest.LazyProxiesEntity3 @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4EntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4EntityType.cs index 59c1c09f817..ee9a338e5a5 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4EntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4EntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -42,20 +41,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, int value) => LazyProxiesEntity4UnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, int value) => LazyProxiesEntity4UnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + int (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -64,21 +63,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity4EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id", "TestNamespace") }); var content = runtimeEntityType.AddProperty( "Content", @@ -87,20 +85,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelInMemoryTest.LazyProxiesEntity4).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); content.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(instance) == null); + string (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Content(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Content(entity) == null, + string (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Content(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Content(instance) == null); content.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => LazyProxiesEntity4UnsafeAccessors.Content(entity) = value); content.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => LazyProxiesEntity4UnsafeAccessors.Content(entity) = value); content.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(content, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue(content), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Content(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + string (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Content(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue(content, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue(content), + object (ValueBuffer valueBuffer) => valueBuffer[1]); content.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -109,31 +107,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); content.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - content.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity4EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content", "TestNamespace") }); var referenceNavigationId = runtimeEntityType.AddProperty( "ReferenceNavigationId", typeof(int), sentinel: 0); referenceNavigationId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue(0) : entry.FlaggedAsTemporary(2) && entry.ReadShadowValue(0) == 0 ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadShadowValue(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue(referenceNavigationId, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(referenceNavigationId, 1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue(0) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue(0) == 0 ? entry.ReadTemporaryValue(0) : entry.ReadShadowValue(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue(referenceNavigationId, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue(referenceNavigationId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); referenceNavigationId.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -142,17 +139,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); referenceNavigationId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); referenceNavigationId.SetCurrentValueComparer(new EntryCurrentValueComparer(referenceNavigationId)); @@ -164,20 +161,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelInMemoryTest.LazyProxiesEntity4).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); title.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(instance) == null); + string (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Title(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors.Title(entity) == null, + string (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Title(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors.Title(instance) == null); title.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => LazyProxiesEntity4UnsafeAccessors.Title(entity) = value); title.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, string value) => LazyProxiesEntity4UnsafeAccessors.Title(entity) = value); title.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(title, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(title), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Title(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + string (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors.Title(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(title, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(title), + object (ValueBuffer valueBuffer) => valueBuffer[3]); title.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -186,20 +183,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); title.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - title.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity4EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title", "TestNamespace") }); var lazyLoader = runtimeEntityType.AddServiceProperty( "LazyLoader", @@ -236,19 +232,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); referenceNavigation.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(instance) == null); + CompiledModelInMemoryTest.LazyProxiesEntity3 (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 entity) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(entity) == null, + CompiledModelInMemoryTest.LazyProxiesEntity3 (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity4 instance) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(instance) == null); referenceNavigation.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, CompiledModelInMemoryTest.LazyProxiesEntity3 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, CompiledModelInMemoryTest.LazyProxiesEntity3 value) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(entity) = value); referenceNavigation.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, CompiledModelInMemoryTest.LazyProxiesEntity3 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity4 entity, CompiledModelInMemoryTest.LazyProxiesEntity3 value) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(entity) = value); referenceNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation((CompiledModelInMemoryTest.LazyProxiesEntity4)entry.Entity), + CompiledModelInMemoryTest.LazyProxiesEntity3 (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), + CompiledModelInMemoryTest.LazyProxiesEntity3 (InternalEntityEntry entry) => LazyProxiesEntity4UnsafeAccessors._referenceNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity4)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyProxiesEntity3>(referenceNavigation), + CompiledModelInMemoryTest.LazyProxiesEntity3 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyProxiesEntity3>(referenceNavigation), null); referenceNavigation.SetPropertyIndexes( index: 0, @@ -256,7 +252,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - referenceNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity4EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation", "TestNamespace") }); var collectionNavigation = principalEntityType.AddNavigation("CollectionNavigation", runtimeForeignKey, onDependent: false, @@ -266,19 +261,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); collectionNavigation.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(instance) == null); + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity) == null, + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity3 instance) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(instance) == null); collectionNavigation.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> value) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> value) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity) = value); collectionNavigation.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> value) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> value) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity) = value); collectionNavigation.SetAccessors( - (InternalEntityEntry entry) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), - (InternalEntityEntry entry) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation((CompiledModelInMemoryTest.LazyProxiesEntity3)entry.Entity), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (InternalEntityEntry entry) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity3)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>>(collectionNavigation), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>>(collectionNavigation), null); collectionNavigation.SetPropertyIndexes( index: 0, @@ -287,12 +282,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 1, storeGenerationIndex: -1); collectionNavigation.SetCollectionAccessor<CompiledModelInMemoryTest.LazyProxiesEntity3, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>, CompiledModelInMemoryTest.LazyProxiesEntity4>( - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> collection) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity) = (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)collection, - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> collection) => LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation(entity) = (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)collection, - (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, Action<CompiledModelInMemoryTest.LazyProxiesEntity3, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelInMemoryTest.LazyProxiesEntity3, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>, CompiledModelInMemoryTest.LazyProxiesEntity4>(entity, setter), - () => (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)(ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)new HashSet<CompiledModelInMemoryTest.LazyProxiesEntity4>(ReferenceEqualityComparer.Instance)); - collectionNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity3EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity3__collectionNavigation", "TestNamespace") }); + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (CompiledModelInMemoryTest.LazyProxiesEntity3 entity) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity), + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> collection) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity) = ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)(collection)), + (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> collection) => LazyProxiesEntity3UnsafeAccessors._collectionNavigation(entity) = ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)(collection)), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> (CompiledModelInMemoryTest.LazyProxiesEntity3 entity, Action<CompiledModelInMemoryTest.LazyProxiesEntity3, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelInMemoryTest.LazyProxiesEntity3, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>, CompiledModelInMemoryTest.LazyProxiesEntity4>(entity, setter), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4> () => ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)(((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity4>)(new HashSet<CompiledModelInMemoryTest.LazyProxiesEntity4>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -307,24 +301,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); var referenceNavigation = runtimeEntityType.FindNavigation("ReferenceNavigation")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity4)source.Entity; - return (ISnapshot)new Snapshot<int, string, int, string>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(content) == null ? null : ((ValueComparer<string>)((IProperty)content).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(content)), ((ValueComparer<int>)((IProperty)referenceNavigationId).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(referenceNavigationId)), source.GetCurrentValue<string>(title) == null ? null : ((ValueComparer<string>)((IProperty)title).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(title))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity4)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, string, int, string>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(content) == null ? null : ((ValueComparer<string>)(((IProperty)content).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(content))), ((ValueComparer<int>)(((IProperty)referenceNavigationId).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(referenceNavigationId)), (source.GetCurrentValue<string>(title) == null ? null : ((ValueComparer<string>)(((IProperty)title).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(title)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)referenceNavigationId).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)referenceNavigationId).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("ReferenceNavigationId") ? (int)source["ReferenceNavigationId"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("ReferenceNavigationId") ? ((int)(source["ReferenceNavigationId"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity4)source.Entity; - return (ISnapshot)new Snapshot<int, int, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)((IProperty)referenceNavigationId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(referenceNavigationId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(entity)); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity4)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)(((IProperty)referenceNavigationId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(referenceNavigationId)), LazyProxiesEntity4UnsafeAccessors._referenceNavigation(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 4, @@ -339,17 +333,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Id(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Content>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Content(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Title>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4_Title(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_referenceNavigation")] - public static extern ref CompiledModelInMemoryTest.LazyProxiesEntity3 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity4__referenceNavigation(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4UnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4UnsafeAccessors.cs new file mode 100644 index 00000000000..e7ef0bc2a18 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_manual/LazyProxiesEntity4UnsafeAccessors.cs @@ -0,0 +1,25 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyProxiesEntity4UnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Content>k__BackingField")] + public static extern ref string Content(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Title>k__BackingField")] + public static extern ref string Title(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_referenceNavigation")] + public static extern ref CompiledModelInMemoryTest.LazyProxiesEntity3 _referenceNavigation(CompiledModelInMemoryTest.LazyProxiesEntity4 @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1EntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1EntityType.cs index 048832212cc..2f75faad836 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1EntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1EntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -44,20 +43,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => LazyProxiesEntity1UnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => LazyProxiesEntity1UnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => LazyProxiesEntity1UnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => LazyProxiesEntity1UnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, int value) => LazyProxiesEntity1UnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, int value) => LazyProxiesEntity1UnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id((CompiledModelInMemoryTest.LazyProxiesEntity1)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id((CompiledModelInMemoryTest.LazyProxiesEntity1)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id((CompiledModelInMemoryTest.LazyProxiesEntity1)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && LazyProxiesEntity1UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity1)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : LazyProxiesEntity1UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity1)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyProxiesEntity1UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity1)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -66,32 +65,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity1EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id", "TestNamespace") }); var referenceNavigationId = runtimeEntityType.AddProperty( "ReferenceNavigationId", typeof(int?), nullable: true); referenceNavigationId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Nullable<int>>(1) : entry.FlaggedAsTemporary(1) && !entry.ReadShadowValue<Nullable<int>>(0).HasValue ? entry.ReadTemporaryValue<Nullable<int>>(1) : entry.ReadShadowValue<Nullable<int>>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<Nullable<int>>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(referenceNavigationId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<int>>(referenceNavigationId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + int? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<int?>(1) : (entry.FlaggedAsTemporary(1) && !(entry.ReadShadowValue<int?>(0).HasValue) ? entry.ReadTemporaryValue<int?>(1) : entry.ReadShadowValue<int?>(0))), + int? (InternalEntityEntry entry) => entry.ReadShadowValue<int?>(0), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(referenceNavigationId, 1), + int? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int?>(referenceNavigationId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); referenceNavigationId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -100,17 +98,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); referenceNavigationId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); referenceNavigationId.SetValueComparer(new NullableValueComparer<int>(referenceNavigationId.TypeMapping.Comparer)); @@ -150,19 +148,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); referenceNavigation.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(instance) == null); + CompiledModelInMemoryTest.LazyProxiesEntity2 (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity1 entity) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(entity) == null, + CompiledModelInMemoryTest.LazyProxiesEntity2 (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity1 instance) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(instance) == null); referenceNavigation.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, CompiledModelInMemoryTest.LazyProxiesEntity2 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, CompiledModelInMemoryTest.LazyProxiesEntity2 value) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(entity) = value); referenceNavigation.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, CompiledModelInMemoryTest.LazyProxiesEntity2 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity1 entity, CompiledModelInMemoryTest.LazyProxiesEntity2 value) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(entity) = value); referenceNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation((CompiledModelInMemoryTest.LazyProxiesEntity1)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation((CompiledModelInMemoryTest.LazyProxiesEntity1)entry.Entity), + CompiledModelInMemoryTest.LazyProxiesEntity2 (InternalEntityEntry entry) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity1)(entry.Entity))), + CompiledModelInMemoryTest.LazyProxiesEntity2 (InternalEntityEntry entry) => LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity1)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyProxiesEntity2>(referenceNavigation), + CompiledModelInMemoryTest.LazyProxiesEntity2 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyProxiesEntity2>(referenceNavigation), null); referenceNavigation.SetPropertyIndexes( index: 0, @@ -170,7 +168,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - referenceNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity1EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation", "TestNamespace") }); var collectionNavigation = principalEntityType.AddNavigation("CollectionNavigation", runtimeForeignKey, onDependent: false, @@ -180,19 +177,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); collectionNavigation.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity) == null, - (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(instance) == null); + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity) == null, + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(instance) == null); collectionNavigation.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> value) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> value) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity) = value); collectionNavigation.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> value) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> value) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity) = value); collectionNavigation.SetAccessors( - (InternalEntityEntry entry) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation((CompiledModelInMemoryTest.LazyProxiesEntity2)entry.Entity), - (InternalEntityEntry entry) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation((CompiledModelInMemoryTest.LazyProxiesEntity2)entry.Entity), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (InternalEntityEntry entry) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity2)(entry.Entity))), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (InternalEntityEntry entry) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(((CompiledModelInMemoryTest.LazyProxiesEntity2)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>>(collectionNavigation), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>>(collectionNavigation), null); collectionNavigation.SetPropertyIndexes( index: 0, @@ -201,11 +198,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 1, storeGenerationIndex: -1); collectionNavigation.SetCollectionAccessor<CompiledModelInMemoryTest.LazyProxiesEntity2, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>, CompiledModelInMemoryTest.LazyProxiesEntity1>( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> collection) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity) = (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)collection, - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> collection) => LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity) = (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)collection, - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, Action<CompiledModelInMemoryTest.LazyProxiesEntity2, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelInMemoryTest.LazyProxiesEntity2, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>, CompiledModelInMemoryTest.LazyProxiesEntity1>(entity, setter), - () => (ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)(ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)new HashSet<CompiledModelInMemoryTest.LazyProxiesEntity1>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity), + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> collection) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity) = ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)(collection)), + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> collection) => LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity) = ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)(collection)), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, Action<CompiledModelInMemoryTest.LazyProxiesEntity2, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelInMemoryTest.LazyProxiesEntity2, ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>, CompiledModelInMemoryTest.LazyProxiesEntity1>(entity, setter), + ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> () => ((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)(((ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1>)(new HashSet<CompiledModelInMemoryTest.LazyProxiesEntity1>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -218,24 +215,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); var referenceNavigation = runtimeEntityType.FindNavigation("ReferenceNavigation")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity1)source.Entity; - return (ISnapshot)new Snapshot<int, Nullable<int>>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<Nullable<int>>(referenceNavigationId) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)referenceNavigationId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(referenceNavigationId))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity1)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int?>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<int?>(referenceNavigationId) == null ? null : ((ValueComparer<int?>)(((IProperty)referenceNavigationId).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(referenceNavigationId)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int, Nullable<int>>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)), default(Nullable<int>) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)referenceNavigationId).GetValueComparer()).Snapshot(default(Nullable<int>)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, int?>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)), (default(int? ) == null ? null : ((ValueComparer<int?>)(((IProperty)referenceNavigationId).GetValueComparer())).Snapshot(default(int? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int, Nullable<int>>(default(int), default(Nullable<int>))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int, int?>(default(int), default(int? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Nullable<int>>(source.ContainsKey("ReferenceNavigationId") ? (Nullable<int>)source["ReferenceNavigationId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int?>((source.ContainsKey("ReferenceNavigationId") ? ((int? )(source["ReferenceNavigationId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<int>>(default(Nullable<int>))); + ISnapshot () => ((ISnapshot)(new Snapshot<int?>(default(int? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity1)source.Entity; - return (ISnapshot)new Snapshot<int, Nullable<int>, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<Nullable<int>>(referenceNavigationId) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)referenceNavigationId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(referenceNavigationId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(entity)); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity1)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int?, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<int?>(referenceNavigationId) == null ? null : ((ValueComparer<int?>)(((IProperty)referenceNavigationId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int?>(referenceNavigationId))), LazyProxiesEntity1UnsafeAccessors.ReferenceNavigation(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -250,11 +247,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_Id(CompiledModelInMemoryTest.LazyProxiesEntity1 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ReferenceNavigation>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.LazyProxiesEntity2 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity1_ReferenceNavigation(CompiledModelInMemoryTest.LazyProxiesEntity1 @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1UnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1UnsafeAccessors.cs new file mode 100644 index 00000000000..ad80c1dc074 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity1UnsafeAccessors.cs @@ -0,0 +1,19 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyProxiesEntity1UnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyProxiesEntity1 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ReferenceNavigation>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.LazyProxiesEntity2 ReferenceNavigation(CompiledModelInMemoryTest.LazyProxiesEntity1 @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2EntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2EntityType.cs index 82f3924627d..bcc516a6f9b 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2EntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2EntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -41,20 +40,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(entity), - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(instance), - (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2UnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyProxiesEntity2 entity) => LazyProxiesEntity2UnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2UnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyProxiesEntity2 instance) => LazyProxiesEntity2UnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, int value) => LazyProxiesEntity2UnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(entity) = value); + (CompiledModelInMemoryTest.LazyProxiesEntity2 entity, int value) => LazyProxiesEntity2UnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id((CompiledModelInMemoryTest.LazyProxiesEntity2)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id((CompiledModelInMemoryTest.LazyProxiesEntity2)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id((CompiledModelInMemoryTest.LazyProxiesEntity2)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && LazyProxiesEntity2UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity2)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : LazyProxiesEntity2UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity2)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyProxiesEntity2UnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyProxiesEntity2)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -63,21 +62,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyProxiesEntity2EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id", "TestNamespace") }); var loader = runtimeEntityType.AddServiceProperty( "Loader", @@ -105,24 +103,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); var collectionNavigation = runtimeEntityType.FindNavigation("CollectionNavigation")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity2)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity2)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyProxiesEntity2)source.Entity; - return (ISnapshot)new Snapshot<int, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(entity))); + var entity = ((CompiledModelInMemoryTest.LazyProxiesEntity2)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), SnapshotFactoryFactory.SnapshotCollection(LazyProxiesEntity2UnsafeAccessors.CollectionNavigation(entity))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, @@ -137,11 +135,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_Id(CompiledModelInMemoryTest.LazyProxiesEntity2 @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CollectionNavigation>k__BackingField")] - public static extern ref ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyProxiesEntity2_CollectionNavigation(CompiledModelInMemoryTest.LazyProxiesEntity2 @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2UnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2UnsafeAccessors.cs new file mode 100644 index 00000000000..aa736f1dd57 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Lazy_loading_proxies/LazyProxiesEntity2UnsafeAccessors.cs @@ -0,0 +1,20 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyProxiesEntity2UnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyProxiesEntity2 @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CollectionNavigation>k__BackingField")] + public static extern ref ICollection<CompiledModelInMemoryTest.LazyProxiesEntity1> CollectionNavigation(CompiledModelInMemoryTest.LazyProxiesEntity2 @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityEntityType.cs index 1ac539dcbb7..08602cd308e 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -41,20 +40,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(entity), - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(instance), - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, int value) => LazyConstructorEntityUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, int value) => LazyConstructorEntityUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && LazyConstructorEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : LazyConstructorEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyConstructorEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -63,21 +62,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id", "TestNamespace") }); var _loader = runtimeEntityType.AddServiceProperty( "_loader", @@ -106,24 +104,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var lazyPropertyDelegateEntity = runtimeEntityType.FindNavigation("LazyPropertyDelegateEntity")!; var lazyPropertyEntity = runtimeEntityType.FindNavigation("LazyPropertyEntity")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyConstructorEntity)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelInMemoryTest.LazyConstructorEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyConstructorEntity)source.Entity; - return (ISnapshot)new Snapshot<int, object, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(entity), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(entity)); + var entity = ((CompiledModelInMemoryTest.LazyConstructorEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, object, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(entity), LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, @@ -138,14 +136,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_Id(CompiledModelInMemoryTest.LazyConstructorEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyPropertyDelegateEntity>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.LazyPropertyDelegateEntity UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(CompiledModelInMemoryTest.LazyConstructorEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyPropertyEntity>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.LazyPropertyEntity UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(CompiledModelInMemoryTest.LazyConstructorEntity @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityUnsafeAccessors.cs new file mode 100644 index 00000000000..b022f36a62f --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyConstructorEntityUnsafeAccessors.cs @@ -0,0 +1,22 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyConstructorEntityUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyConstructorEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyPropertyDelegateEntity>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.LazyPropertyDelegateEntity LazyPropertyDelegateEntity(CompiledModelInMemoryTest.LazyConstructorEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyPropertyEntity>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.LazyPropertyEntity LazyPropertyEntity(CompiledModelInMemoryTest.LazyConstructorEntity @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityEntityType.cs index f6658fee882..6744e37085e 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -43,20 +42,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(entity), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(instance), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => LazyPropertyDelegateEntityUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => LazyPropertyDelegateEntityUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && LazyPropertyDelegateEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : LazyPropertyDelegateEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyPropertyDelegateEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -65,21 +64,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyDelegateEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id", "TestNamespace") }); var lazyConstructorEntityId = runtimeEntityType.AddProperty( "LazyConstructorEntityId", @@ -88,20 +86,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelInMemoryTest.LazyPropertyDelegateEntity).GetField("<LazyConstructorEntityId>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); lazyConstructorEntityId.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(entity), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(entity) == 0, - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(instance), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(instance) == 0); + int (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(entity), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(entity) == 0, + int (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(instance), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(instance) == 0); lazyConstructorEntityId.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(entity) = value); lazyConstructorEntityId.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, int value) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(entity) = value); lazyConstructorEntityId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<int>(1) : entry.FlaggedAsTemporary(1) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(1) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(lazyConstructorEntityId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(lazyConstructorEntityId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<int>(1) : (entry.FlaggedAsTemporary(1) && LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(1) : LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(lazyConstructorEntityId, 1), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(lazyConstructorEntityId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); lazyConstructorEntityId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -110,21 +108,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); lazyConstructorEntityId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); lazyConstructorEntityId.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(lazyConstructorEntityId)); - lazyConstructorEntityId.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyDelegateEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId", "TestNamespace") }); var lazyLoader = runtimeEntityType.AddServiceProperty( "LazyLoader", @@ -173,19 +170,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); lazyConstructorEntity.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(entity), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(entity) == null, - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(instance), - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(instance) == null); + CompiledModelInMemoryTest.LazyConstructorEntity (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(entity), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(entity) == null, + CompiledModelInMemoryTest.LazyConstructorEntity (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(instance), + bool (CompiledModelInMemoryTest.LazyPropertyDelegateEntity instance) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(instance) == null); lazyConstructorEntity.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(entity) = value); lazyConstructorEntity.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyDelegateEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(entity) = value); lazyConstructorEntity.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)entry.Entity), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyConstructorEntity>(lazyConstructorEntity), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyConstructorEntity>(lazyConstructorEntity), null); lazyConstructorEntity.SetPropertyIndexes( index: 0, @@ -193,7 +190,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - lazyConstructorEntity.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyDelegateEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity", "TestNamespace") }); var lazyPropertyDelegateEntity = principalEntityType.AddNavigation("LazyPropertyDelegateEntity", runtimeForeignKey, onDependent: false, @@ -203,19 +199,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); lazyPropertyDelegateEntity.SetGetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(entity), - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(entity) == null, - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(instance), - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(instance) == null); + CompiledModelInMemoryTest.LazyPropertyDelegateEntity (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(entity), + bool (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(entity) == null, + CompiledModelInMemoryTest.LazyPropertyDelegateEntity (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(instance), + bool (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(instance) == null); lazyPropertyDelegateEntity.SetSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyDelegateEntity value) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyDelegateEntity value) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(entity) = value); lazyPropertyDelegateEntity.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyDelegateEntity value) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyDelegateEntity value) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(entity) = value); lazyPropertyDelegateEntity.SetAccessors( - (InternalEntityEntry entry) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), - (InternalEntityEntry entry) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), + CompiledModelInMemoryTest.LazyPropertyDelegateEntity (InternalEntityEntry entry) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))), + CompiledModelInMemoryTest.LazyPropertyDelegateEntity (InternalEntityEntry entry) => LazyConstructorEntityUnsafeAccessors.LazyPropertyDelegateEntity(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyPropertyDelegateEntity>(lazyPropertyDelegateEntity), + CompiledModelInMemoryTest.LazyPropertyDelegateEntity (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyPropertyDelegateEntity>(lazyPropertyDelegateEntity), null); lazyPropertyDelegateEntity.SetPropertyIndexes( index: 0, @@ -223,7 +219,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 1, storeGenerationIndex: -1); - lazyPropertyDelegateEntity.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyDelegateEntity", "TestNamespace") }); return runtimeForeignKey; } @@ -236,24 +231,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); var lazyConstructorEntity = runtimeEntityType.FindNavigation("LazyConstructorEntity")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyPropertyDelegateEntity)source.Entity; - return (ISnapshot)new Snapshot<int, int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId))); + var entity = ((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int, int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int, int>(default(int), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int, int>(default(int), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyPropertyDelegateEntity)source.Entity; - return (ISnapshot)new Snapshot<int, int, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(entity)); + var entity = ((CompiledModelInMemoryTest.LazyPropertyDelegateEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId)), LazyPropertyDelegateEntityUnsafeAccessors.LazyConstructorEntity(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -268,14 +263,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_Id(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntityId>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntityId(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntity>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.LazyConstructorEntity UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyDelegateEntity_LazyConstructorEntity(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityUnsafeAccessors.cs new file mode 100644 index 00000000000..b8f7a843ebd --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyDelegateEntityUnsafeAccessors.cs @@ -0,0 +1,22 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyPropertyDelegateEntityUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntityId>k__BackingField")] + public static extern ref int LazyConstructorEntityId(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntity>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.LazyConstructorEntity LazyConstructorEntity(CompiledModelInMemoryTest.LazyPropertyDelegateEntity @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityEntityType.cs index b1941dcc06b..b2300d72033 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -43,20 +42,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(entity), - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(entity) == 0, - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(instance), - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(instance) == 0); + int (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.Id(entity) == 0, + int (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => LazyPropertyEntityUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => LazyPropertyEntityUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && LazyPropertyEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : LazyPropertyEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyPropertyEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -65,21 +64,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id", "TestNamespace") }); var lazyConstructorEntityId = runtimeEntityType.AddProperty( "LazyConstructorEntityId", @@ -88,20 +86,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelInMemoryTest.LazyPropertyEntity).GetField("<LazyConstructorEntityId>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); lazyConstructorEntityId.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(entity), - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(entity) == 0, - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(instance), - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(instance) == 0); + int (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(entity), + bool (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(entity) == 0, + int (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(instance), + bool (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(instance) == 0); lazyConstructorEntityId.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(entity) = value); lazyConstructorEntityId.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, int value) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(entity) = value); lazyConstructorEntityId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<int>(1) : entry.FlaggedAsTemporary(1) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(1) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(lazyConstructorEntityId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(lazyConstructorEntityId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<int>(1) : (entry.FlaggedAsTemporary(1) && LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(1) : LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))))), + int (InternalEntityEntry entry) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntityId(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(lazyConstructorEntityId, 1), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(lazyConstructorEntityId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); lazyConstructorEntityId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -110,21 +108,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); lazyConstructorEntityId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); lazyConstructorEntityId.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(lazyConstructorEntityId)); - lazyConstructorEntityId.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId", "TestNamespace") }); var loader = runtimeEntityType.AddServiceProperty( "Loader", @@ -162,19 +159,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); lazyConstructorEntity.SetGetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(entity), - (CompiledModelInMemoryTest.LazyPropertyEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(entity) == null, - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(instance), - (CompiledModelInMemoryTest.LazyPropertyEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(instance) == null); + CompiledModelInMemoryTest.LazyConstructorEntity (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(entity), + bool (CompiledModelInMemoryTest.LazyPropertyEntity entity) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(entity) == null, + CompiledModelInMemoryTest.LazyConstructorEntity (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(instance), + bool (CompiledModelInMemoryTest.LazyPropertyEntity instance) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(instance) == null); lazyConstructorEntity.SetSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(entity) = value); lazyConstructorEntity.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyPropertyEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(entity) = value); + (CompiledModelInMemoryTest.LazyPropertyEntity entity, CompiledModelInMemoryTest.LazyConstructorEntity value) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(entity) = value); lazyConstructorEntity.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity((CompiledModelInMemoryTest.LazyPropertyEntity)entry.Entity), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(((CompiledModelInMemoryTest.LazyPropertyEntity)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyConstructorEntity>(lazyConstructorEntity), + CompiledModelInMemoryTest.LazyConstructorEntity (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyConstructorEntity>(lazyConstructorEntity), null); lazyConstructorEntity.SetPropertyIndexes( index: 0, @@ -182,7 +179,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - lazyConstructorEntity.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyPropertyEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity", "TestNamespace") }); var lazyPropertyEntity = principalEntityType.AddNavigation("LazyPropertyEntity", runtimeForeignKey, onDependent: false, @@ -192,19 +188,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt propertyAccessMode: PropertyAccessMode.Field); lazyPropertyEntity.SetGetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(entity), - (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(entity) == null, - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(instance), - (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(instance) == null); + CompiledModelInMemoryTest.LazyPropertyEntity (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(entity), + bool (CompiledModelInMemoryTest.LazyConstructorEntity entity) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(entity) == null, + CompiledModelInMemoryTest.LazyPropertyEntity (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(instance), + bool (CompiledModelInMemoryTest.LazyConstructorEntity instance) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(instance) == null); lazyPropertyEntity.SetSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyEntity value) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyEntity value) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(entity) = value); lazyPropertyEntity.SetMaterializationSetter( - (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyEntity value) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity(entity) = value); + (CompiledModelInMemoryTest.LazyConstructorEntity entity, CompiledModelInMemoryTest.LazyPropertyEntity value) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(entity) = value); lazyPropertyEntity.SetAccessors( - (InternalEntityEntry entry) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), - (InternalEntityEntry entry) => LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity((CompiledModelInMemoryTest.LazyConstructorEntity)entry.Entity), + CompiledModelInMemoryTest.LazyPropertyEntity (InternalEntityEntry entry) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))), + CompiledModelInMemoryTest.LazyPropertyEntity (InternalEntityEntry entry) => LazyConstructorEntityUnsafeAccessors.LazyPropertyEntity(((CompiledModelInMemoryTest.LazyConstructorEntity)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyPropertyEntity>(lazyPropertyEntity), + CompiledModelInMemoryTest.LazyPropertyEntity (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.LazyPropertyEntity>(lazyPropertyEntity), null); lazyPropertyEntity.SetPropertyIndexes( index: 1, @@ -212,7 +208,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - lazyPropertyEntity.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("LazyConstructorEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyConstructorEntity_LazyPropertyEntity", "TestNamespace") }); return runtimeForeignKey; } @@ -225,24 +220,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); var lazyConstructorEntity = runtimeEntityType.FindNavigation("LazyConstructorEntity")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyPropertyEntity)source.Entity; - return (ISnapshot)new Snapshot<int, int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId))); + var entity = ((CompiledModelInMemoryTest.LazyPropertyEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int, int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int, int>(default(int), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int, int>(default(int), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.LazyPropertyEntity)source.Entity; - return (ISnapshot)new Snapshot<int, int, object>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)((IProperty)lazyConstructorEntityId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(entity)); + var entity = ((CompiledModelInMemoryTest.LazyPropertyEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, int, object>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), ((ValueComparer<int>)(((IProperty)lazyConstructorEntityId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(lazyConstructorEntityId)), LazyPropertyEntityUnsafeAccessors.LazyConstructorEntity(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -257,14 +252,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_Id(CompiledModelInMemoryTest.LazyPropertyEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntityId>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntityId(CompiledModelInMemoryTest.LazyPropertyEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntity>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.LazyConstructorEntity UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_LazyPropertyEntity_LazyConstructorEntity(CompiledModelInMemoryTest.LazyPropertyEntity @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityUnsafeAccessors.cs new file mode 100644 index 00000000000..5ce57ea1690 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Manual_lazy_loading/LazyPropertyEntityUnsafeAccessors.cs @@ -0,0 +1,22 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class LazyPropertyEntityUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelInMemoryTest.LazyPropertyEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntityId>k__BackingField")] + public static extern ref int LazyConstructorEntityId(CompiledModelInMemoryTest.LazyPropertyEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<LazyConstructorEntity>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.LazyConstructorEntity LazyConstructorEntity(CompiledModelInMemoryTest.LazyPropertyEntity @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseEntityType.cs index 9e0ee04fa8a..0c1ebcab188 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -41,20 +40,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<long>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<long>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<long>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + long? (CompiledModelTestBase.DependentBase<long?> entity) => DependentBaseUnsafeAccessors<long?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<long?> entity) => !(DependentBaseUnsafeAccessors<long?>.Id(entity).HasValue), + long? (CompiledModelTestBase.DependentBase<long?> instance) => DependentBaseUnsafeAccessors<long?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<long?> instance) => !(DependentBaseUnsafeAccessors<long?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<long?> entity, long? value) => DependentBaseUnsafeAccessors<long?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<long?> entity, long? value) => DependentBaseUnsafeAccessors<long?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<long>>)entry.Entity).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<long>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<long>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(0) && !(DependentBaseUnsafeAccessors<long?>.Id(((CompiledModelTestBase.DependentBase<long?>)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue<long?>(0) : DependentBaseUnsafeAccessors<long?>.Id(((CompiledModelTestBase.DependentBase<long?>)(entry.Entity))))), + long? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<long?>.Id(((CompiledModelTestBase.DependentBase<long?>)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -63,23 +62,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var principalId = runtimeEntityType.AddProperty( "PrincipalId", @@ -87,11 +85,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<long>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(1) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<long>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(1) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 1), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -100,17 +98,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); @@ -142,19 +140,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<long?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<long>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<long>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<long>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> (CompiledModelTestBase.DependentBase<long?> entity) => DependentBaseUnsafeAccessors<long?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<long?> entity) => DependentBaseUnsafeAccessors<long?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> (CompiledModelTestBase.DependentBase<long?> instance) => DependentBaseUnsafeAccessors<long?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<long?> instance) => DependentBaseUnsafeAccessors<long?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<long?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> value) => DependentBaseUnsafeAccessors<long?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<long>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<long?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> value) => DependentBaseUnsafeAccessors<long?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<long>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<long>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<long?>.Principal(((CompiledModelTestBase.DependentBase<long?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<long?>.Principal(((CompiledModelTestBase.DependentBase<long?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -162,7 +160,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -171,19 +168,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>).GetField("<Dependent>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<long?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<long?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> entity, CompiledModelTestBase.DependentBase<Nullable<long>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> entity, CompiledModelTestBase.DependentBase<long?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>> entity, CompiledModelTestBase.DependentBase<Nullable<long>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> entity, CompiledModelTestBase.DependentBase<long?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>>)entry.Entity), + CompiledModelTestBase.DependentBase<long?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<long?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<long>>>(dependent), + CompiledModelTestBase.DependentBase<long?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<long?>>(dependent), null); dependent.SetPropertyIndexes( index: 1, @@ -206,24 +203,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<long>(key0)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<long>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, long>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId))); + var entity = ((CompiledModelTestBase.DependentBase<long?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>), default(long))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, long>(default(long? ), default(long))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long>(default(long))); + ISnapshot () => ((ISnapshot)(new Snapshot<long>(default(long))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<long>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, long, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<long?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), DependentBaseUnsafeAccessors<long?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -238,11 +235,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<long?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<long?> @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseEntityType.cs index cecad1d8ae8..bdfc9f07e57 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -46,20 +45,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(0) && !(PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue<long?>(0) : PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -68,23 +67,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var discriminator = runtimeEntityType.AddProperty( "Discriminator", @@ -92,11 +90,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[1]); discriminator.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -105,17 +103,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); @@ -126,20 +124,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AnEnum)0); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum1.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -148,20 +146,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter<CompiledModelTestBase.AnEnum>.Instance); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -170,20 +167,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum2.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -192,22 +189,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), clrType: typeof(CompiledModelTestBase.AnEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter<CompiledModelTestBase.AnEnum>.Instance); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -216,20 +212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (CompiledModelTestBase.AFlagsEnum)0); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum1.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -238,20 +234,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), clrType: typeof(CompiledModelTestBase.AFlagsEnum), jsonValueReaderWriter: JsonSignedEnumReaderWriter<CompiledModelTestBase.AFlagsEnum>.Instance); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var principalId = runtimeEntityType.AddProperty( "PrincipalId", @@ -259,11 +254,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue<long>(1) : entry.FlaggedAsTemporary(5) && entry.ReadShadowValue<long>(1) == 0L ? entry.ReadTemporaryValue<long>(1) : entry.ReadShadowValue<long>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 5), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 1), - (ValueBuffer valueBuffer) => valueBuffer[5]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue<long>(1) : (entry.FlaggedAsTemporary(5) && entry.ReadShadowValue<long>(1) == 0L ? entry.ReadTemporaryValue<long>(1) : entry.ReadShadowValue<long>(1))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(1), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 5), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[5]); principalId.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -272,17 +267,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalId.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); @@ -294,20 +289,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 6), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeArray.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -316,51 +311,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -369,20 +363,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 7), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeEnumerable.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -391,37 +385,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -430,20 +423,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 8), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeIList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -452,37 +445,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance)); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -491,20 +483,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 9), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -513,51 +505,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -566,20 +557,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[10]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 10), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeArray.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -588,37 +579,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( JsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( JsonDateTimeReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), clrType: typeof(DateTime), jsonValueReaderWriter: JsonDateTimeReaderWriter.Instance)); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -627,20 +617,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 11), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeEnumerable.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -649,37 +639,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -688,20 +677,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 12), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeIList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -710,37 +699,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), clrType: typeof(byte), jsonValueReaderWriter: JsonByteReaderWriter.Instance)); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -749,20 +737,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 13), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -771,37 +759,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), clrType: typeof(short), jsonValueReaderWriter: JsonInt16ReaderWriter.Instance)); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -849,24 +836,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<long>(key0)); var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, long, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, long, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>), default(long))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, long>(default(long? ), default(long))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, long>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, long>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, long>(default(string), default(long))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, long>(default(string), default(long))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, long, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity))); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 14, @@ -881,44 +868,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..f89400fa561 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,54 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedEntityType.cs index db29b1d44c4..c05153ac914 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -51,19 +50,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Deriveds>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); deriveds.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); deriveds.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetAccessors( - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), null); deriveds.SetPropertyIndexes( index: 0, @@ -72,12 +71,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 2, storeGenerationIndex: -1); deriveds.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - deriveds.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -100,24 +98,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; var dependent = runtimeEntityType.FindNavigation("Dependent")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, long, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, long, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, long>(default(Nullable<long>), default(long))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, long>(default(long? ), default(long))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, long>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, long>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, long>(default(string), default(long))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, long>(default(string), default(long))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<long>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, long, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity)); + var entity = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity)), PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<long?>>.Dependent(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 14, @@ -132,8 +130,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<long?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<long?>> @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..2accb2bfd5b --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/RelationshipCycles/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityEntityType.cs index 97219ad4ceb..b9b2aeb7329 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -40,20 +39,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); id.SetGetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(entity), - (CompiledModelInMemoryTest.SelfReferentialEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(entity) == 0L, - (CompiledModelInMemoryTest.SelfReferentialEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(instance), - (CompiledModelInMemoryTest.SelfReferentialEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(instance) == 0L); + long (CompiledModelInMemoryTest.SelfReferentialEntity entity) => SelfReferentialEntityUnsafeAccessors.Id(entity), + bool (CompiledModelInMemoryTest.SelfReferentialEntity entity) => SelfReferentialEntityUnsafeAccessors.Id(entity) == 0L, + long (CompiledModelInMemoryTest.SelfReferentialEntity instance) => SelfReferentialEntityUnsafeAccessors.Id(instance), + bool (CompiledModelInMemoryTest.SelfReferentialEntity instance) => SelfReferentialEntityUnsafeAccessors.Id(instance) == 0L); id.SetSetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(entity) = value); + (CompiledModelInMemoryTest.SelfReferentialEntity entity, long value) => SelfReferentialEntityUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(entity) = value); + (CompiledModelInMemoryTest.SelfReferentialEntity entity, long value) => SelfReferentialEntityUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id((CompiledModelInMemoryTest.SelfReferentialEntity)entry.Entity) == 0L ? entry.ReadTemporaryValue<long>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id((CompiledModelInMemoryTest.SelfReferentialEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id((CompiledModelInMemoryTest.SelfReferentialEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && SelfReferentialEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.SelfReferentialEntity)(entry.Entity))) == 0L ? entry.ReadTemporaryValue<long>(0) : SelfReferentialEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.SelfReferentialEntity)(entry.Entity))))), + long (InternalEntityEntry entry) => SelfReferentialEntityUnsafeAccessors.Id(((CompiledModelInMemoryTest.SelfReferentialEntity)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(id, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -62,21 +61,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), clrType: typeof(long), jsonValueReaderWriter: JsonInt64ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("SelfReferentialEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id", "TestNamespace") }); var collection = runtimeEntityType.AddProperty( "Collection", @@ -86,20 +84,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullable: true, valueConverter: new CompiledModelInMemoryTest.SelfReferentialPropertyValueConverter()); collection.SetGetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(entity), - (CompiledModelInMemoryTest.SelfReferentialEntity entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(entity) == null, - (CompiledModelInMemoryTest.SelfReferentialEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(instance), - (CompiledModelInMemoryTest.SelfReferentialEntity instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(instance) == null); + CompiledModelInMemoryTest.SelfReferentialProperty (CompiledModelInMemoryTest.SelfReferentialEntity entity) => SelfReferentialEntityUnsafeAccessors.Collection(entity), + bool (CompiledModelInMemoryTest.SelfReferentialEntity entity) => SelfReferentialEntityUnsafeAccessors.Collection(entity) == null, + CompiledModelInMemoryTest.SelfReferentialProperty (CompiledModelInMemoryTest.SelfReferentialEntity instance) => SelfReferentialEntityUnsafeAccessors.Collection(instance), + bool (CompiledModelInMemoryTest.SelfReferentialEntity instance) => SelfReferentialEntityUnsafeAccessors.Collection(instance) == null); collection.SetSetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity, CompiledModelInMemoryTest.SelfReferentialProperty value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(entity) = value); + (CompiledModelInMemoryTest.SelfReferentialEntity entity, CompiledModelInMemoryTest.SelfReferentialProperty value) => SelfReferentialEntityUnsafeAccessors.Collection(entity) = value); collection.SetMaterializationSetter( - (CompiledModelInMemoryTest.SelfReferentialEntity entity, CompiledModelInMemoryTest.SelfReferentialProperty value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(entity) = value); + (CompiledModelInMemoryTest.SelfReferentialEntity entity, CompiledModelInMemoryTest.SelfReferentialProperty value) => SelfReferentialEntityUnsafeAccessors.Collection(entity) = value); collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection((CompiledModelInMemoryTest.SelfReferentialEntity)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection((CompiledModelInMemoryTest.SelfReferentialEntity)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection), - (ValueBuffer valueBuffer) => valueBuffer[1]); + CompiledModelInMemoryTest.SelfReferentialProperty (InternalEntityEntry entry) => SelfReferentialEntityUnsafeAccessors.Collection(((CompiledModelInMemoryTest.SelfReferentialEntity)(entry.Entity))), + CompiledModelInMemoryTest.SelfReferentialProperty (InternalEntityEntry entry) => SelfReferentialEntityUnsafeAccessors.Collection(((CompiledModelInMemoryTest.SelfReferentialEntity)(entry.Entity))), + CompiledModelInMemoryTest.SelfReferentialProperty (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection, 1), + CompiledModelInMemoryTest.SelfReferentialProperty (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection), + object (ValueBuffer valueBuffer) => valueBuffer[1]); collection.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -108,26 +106,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); collection.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelInMemoryTest.SelfReferentialProperty>( - (CompiledModelInMemoryTest.SelfReferentialProperty v1, CompiledModelInMemoryTest.SelfReferentialProperty v2) => object.Equals(v1, v2), - (CompiledModelInMemoryTest.SelfReferentialProperty v) => ((object)v).GetHashCode(), - (CompiledModelInMemoryTest.SelfReferentialProperty v) => v), + bool (CompiledModelInMemoryTest.SelfReferentialProperty v1, CompiledModelInMemoryTest.SelfReferentialProperty v2) => object.Equals(v1, v2), + int (CompiledModelInMemoryTest.SelfReferentialProperty v) => ((object)v).GetHashCode(), + CompiledModelInMemoryTest.SelfReferentialProperty (CompiledModelInMemoryTest.SelfReferentialProperty v) => v), keyComparer: new ValueComparer<CompiledModelInMemoryTest.SelfReferentialProperty>( - (CompiledModelInMemoryTest.SelfReferentialProperty v1, CompiledModelInMemoryTest.SelfReferentialProperty v2) => object.Equals(v1, v2), - (CompiledModelInMemoryTest.SelfReferentialProperty v) => ((object)v).GetHashCode(), - (CompiledModelInMemoryTest.SelfReferentialProperty v) => v), + bool (CompiledModelInMemoryTest.SelfReferentialProperty v1, CompiledModelInMemoryTest.SelfReferentialProperty v2) => object.Equals(v1, v2), + int (CompiledModelInMemoryTest.SelfReferentialProperty v) => ((object)v).GetHashCode(), + CompiledModelInMemoryTest.SelfReferentialProperty (CompiledModelInMemoryTest.SelfReferentialProperty v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelInMemoryTest.SelfReferentialProperty, string>( - (CompiledModelInMemoryTest.SelfReferentialProperty v) => null, - (string v) => null), + string (CompiledModelInMemoryTest.SelfReferentialProperty v) => null, + CompiledModelInMemoryTest.SelfReferentialProperty (string v) => null), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelInMemoryTest.SelfReferentialProperty, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelInMemoryTest.SelfReferentialProperty, string>( - (CompiledModelInMemoryTest.SelfReferentialProperty v) => null, - (string v) => null))); - collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("SelfReferentialEntityEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection", "TestNamespace") }); + string (CompiledModelInMemoryTest.SelfReferentialProperty v) => null, + CompiledModelInMemoryTest.SelfReferentialProperty (string v) => null))); var key = runtimeEntityType.AddKey( new[] { id }); @@ -144,24 +141,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<long>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<long>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.SelfReferentialEntity)source.Entity; - return (ISnapshot)new Snapshot<long, CompiledModelInMemoryTest.SelfReferentialProperty>(((ValueComparer<long>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(id)), source.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection) == null ? null : ((ValueComparer<CompiledModelInMemoryTest.SelfReferentialProperty>)((IProperty)collection).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection))); + var entity = ((CompiledModelInMemoryTest.SelfReferentialEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, CompiledModelInMemoryTest.SelfReferentialProperty>(((ValueComparer<long>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(id)), (source.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection) == null ? null : ((ValueComparer<CompiledModelInMemoryTest.SelfReferentialProperty>)(((IProperty)collection).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelInMemoryTest.SelfReferentialProperty>(collection)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long>(((ValueComparer<long>)((IProperty)id).GetValueComparer()).Snapshot(default(long)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long>(((ValueComparer<long>)(((IProperty)id).GetValueComparer())).Snapshot(default(long)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long>(default(long))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long>(default(long))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelInMemoryTest.SelfReferentialEntity)source.Entity; - return (ISnapshot)new Snapshot<long>(((ValueComparer<long>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(id))); + var entity = ((CompiledModelInMemoryTest.SelfReferentialEntity)(source.Entity)); + return ((ISnapshot)(new Snapshot<long>(((ValueComparer<long>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -176,11 +173,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Id(CompiledModelInMemoryTest.SelfReferentialEntity @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Collection>k__BackingField")] - public static extern ref CompiledModelInMemoryTest.SelfReferentialProperty UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_SelfReferentialEntity_Collection(CompiledModelInMemoryTest.SelfReferentialEntity @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityUnsafeAccessors.cs new file mode 100644 index 00000000000..115dc3e01fb --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/Self_referential_property/SelfReferentialEntityUnsafeAccessors.cs @@ -0,0 +1,19 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class SelfReferentialEntityUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long Id(CompiledModelInMemoryTest.SelfReferentialEntity @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Collection>k__BackingField")] + public static extern ref CompiledModelInMemoryTest.SelfReferentialProperty Collection(CompiledModelInMemoryTest.SelfReferentialEntity @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..ae6e1779611 --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,15 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs index 745633e560f..b0c187360a6 100644 --- a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.InMemory.Storage.Internal; @@ -38,20 +37,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) == 0, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance) == 0); + int (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity) == 0, + int (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance) == 0); id.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -60,21 +59,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), clrType: typeof(int), jsonValueReaderWriter: JsonInt32ReaderWriter.Instance); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var data = runtimeEntityType.AddProperty( "Data", @@ -83,20 +81,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentDerived<int>).GetField("<Data>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); data.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[1]); data.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -105,20 +103,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = InMemoryTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), clrType: typeof(string), jsonValueReaderWriter: JsonStringReaderWriter.Instance); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -135,24 +132,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int, string>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, string>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -167,11 +164,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<int> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<int> @this); } } diff --git a/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.InMemory.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.Relational.Specification.Tests/Scaffolding/CompiledModelRelationalTestBase.cs b/test/EFCore.Relational.Specification.Tests/Scaffolding/CompiledModelRelationalTestBase.cs index ab7962f62b9..bf231d55f33 100644 --- a/test/EFCore.Relational.Specification.Tests/Scaffolding/CompiledModelRelationalTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Scaffolding/CompiledModelRelationalTestBase.cs @@ -16,23 +16,22 @@ public virtual Task BigModel_with_JSON_columns() => Test( modelBuilder => BuildBigModel(modelBuilder, jsonColumns: true), model => AssertBigModel(model, jsonColumns: true), - // Blocked by dotnet/runtime/issues/89439 - //c => - //{ - // c.Set<PrincipalDerived<DependentBase<byte?>>>().Add( - // new PrincipalDerived<DependentBase<byte?>> - // { - // Id = 1, - // AlternateId = new Guid(), - // Dependent = new DependentDerived<byte?>(1, "one"), - // Owned = new OwnedType(c) - // }); - - // c.SaveChanges(); - - // var dependent = c.Set<PrincipalDerived<DependentBase<byte?>>>().Include(p => p.Dependent).Single().Dependent!; - // Assert.Equal("one", ((DependentDerived<byte?>)dependent).GetData()); - //}, + async c => + { + c.Set<PrincipalDerived<DependentBase<byte?>>>().Add( + new PrincipalDerived<DependentBase<byte?>> + { + Id = 1, + AlternateId = new Guid(), + Dependent = new DependentDerived<byte?>(1, "one"), + Owned = new OwnedType(c) + }); + + await c.SaveChangesAsync(); + + var dependent = c.Set<PrincipalDerived<DependentBase<byte?>>>().Include(p => p.Dependent).Single().Dependent!; + Assert.Equal("one", ((DependentDerived<byte?>)dependent).GetData()); + }, options: new CompiledModelCodeGenerationOptions { UseNullableReferenceTypes = true }); protected override void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumns) @@ -48,6 +47,8 @@ protected override void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumn .Metadata.SetColumnName("DerivedId", StoreObjectIdentifier.Table("PrincipalDerived")); } + eb.HasIndex(e => new { e.AlternateId, e.Id }); + eb.HasKey(e => new { e.Id, e.AlternateId }) .HasName("PK"); @@ -159,19 +160,29 @@ protected override void AssertBigModel(IModel model, bool jsonColumns) Assert.Equal("Id", principalId.GetColumnName()); + var principalAlternateId = principalBase.FindProperty(nameof(PrincipalBase.AlternateId))!; + Assert.Equal(PropertyAccessMode.FieldDuringConstruction, principalAlternateId.GetPropertyAccessMode()); + var compositeIndex = principalBase.GetIndexes().Single(); + Assert.Empty(compositeIndex.GetAnnotations()); + Assert.Equal([principalAlternateId, principalId], compositeIndex.Properties); + Assert.False(compositeIndex.IsUnique); + Assert.Null(compositeIndex.Name); + Assert.Equal([compositeIndex], principalAlternateId.GetContainingIndexes()); Assert.Equal("IX_PrincipalBase_AlternateId_Id", compositeIndex.GetDatabaseName()); + Assert.Equal(2, principalBase.GetKeys().Count()); + var principalAlternateKey = principalBase.GetKeys().First(); Assert.Equal("AK_PrincipalBase_Id", principalAlternateKey.GetName()); var principalKey = principalBase.GetKeys().Last(); Assert.Equal( - new[] { RelationalAnnotationNames.Name }, + [RelationalAnnotationNames.Name], principalKey.GetAnnotations().Select(a => a.Name)); Assert.Equal("PK", principalKey.GetName()); - Assert.Equal(new[] { principalAlternateKey, principalKey }, principalId.GetContainingKeys()); + Assert.Equal([principalAlternateKey, principalKey], principalId.GetContainingKeys()); Assert.Equal("PrincipalBase", principalBase.GetTableName()); if (jsonColumns) @@ -184,6 +195,8 @@ protected override void AssertBigModel(IModel model, bool jsonColumns) } var principalDerived = model.FindEntityType(typeof(PrincipalDerived<DependentBase<byte?>>))!; + Assert.Equal("PrincipalDerived<DependentBase<byte?>>", principalDerived.GetDiscriminatorValue()); + var dependentNavigation = principalDerived.GetDeclaredNavigations().First(); var dependentForeignKey = dependentNavigation.ForeignKey; @@ -239,7 +252,7 @@ protected override void AssertBigModel(IModel model, bool jsonColumns) Assert.Same( derivedSkipNavigation.Inverse, derivedSkipNavigation.Inverse.ForeignKey.GetReferencingSkipNavigations().Single()); - Assert.Equal(new[] { derivedSkipNavigation.Inverse, derivedSkipNavigation }, principalDerived.GetSkipNavigations()); + Assert.Equal([derivedSkipNavigation.Inverse, derivedSkipNavigation], principalDerived.GetSkipNavigations()); var joinType = derivedSkipNavigation.JoinEntityType; Assert.Null(joinType[RelationalAnnotationNames.Comment]); @@ -253,6 +266,8 @@ protected override void AssertBigModel(IModel model, bool jsonColumns) Assert.Throws<InvalidOperationException>(() => joinType.IsTableExcludedFromMigrations()).Message); var rowid = joinType.GetProperties().Single(p => !p.IsForeignKey()); + Assert.True(rowid.IsConcurrencyToken); + Assert.Equal(ValueGenerated.OnAddOrUpdate, rowid.ValueGenerated); Assert.Equal("rowid", rowid.GetColumnName()); Assert.Null(rowid[RelationalAnnotationNames.Comment]); Assert.Equal( @@ -284,18 +299,17 @@ protected override void AssertBigModel(IModel model, bool jsonColumns) if (jsonColumns) { Assert.Equal( - new[] - { + [ derivedSkipNavigation.ForeignKey, referenceOwnership, collectionOwnership, dependentForeignKey, derivedSkipNavigation.Inverse.ForeignKey - }, + ], principalKey.GetReferencingForeignKeys()); Assert.Equal( - new[] { dependentBaseForeignKey, referenceOwnership, derivedSkipNavigation.Inverse.ForeignKey }, + [dependentBaseForeignKey, referenceOwnership, derivedSkipNavigation.Inverse.ForeignKey], principalBase.GetReferencingForeignKeys()); } else @@ -330,6 +344,7 @@ protected override void BuildComplexTypesModel(ModelBuilder modelBuilder) e => e.Owned, eb => { eb.Property(c => c.Details) + .IsRowVersion() .HasColumnName("Deets") .HasColumnOrder(1) .HasColumnType("varchar") @@ -396,8 +411,7 @@ protected override void AssertComplexTypes(IModel model) var complexProperty = principalBase.GetComplexProperties().Single(); var complexType = complexProperty.ComplexType; Assert.Equal( - new[] - { + [ RelationalAnnotationNames.FunctionName, RelationalAnnotationNames.Schema, RelationalAnnotationNames.SqlQuery, @@ -405,10 +419,14 @@ protected override void AssertComplexTypes(IModel model) RelationalAnnotationNames.ViewName, RelationalAnnotationNames.ViewSchema, "go" - }, + ], complexType.GetAnnotations().Select(a => a.Name)); var detailsProperty = complexType.FindProperty(nameof(OwnedType.Details))!; + Assert.True(detailsProperty.IsConcurrencyToken); + Assert.Equal(ValueGenerated.OnAddOrUpdate, detailsProperty.ValueGenerated); + Assert.Equal(PropertySaveBehavior.Ignore, detailsProperty.GetAfterSaveBehavior()); + Assert.Equal(PropertySaveBehavior.Ignore, detailsProperty.GetBeforeSaveBehavior()); Assert.Equal("Deets", detailsProperty.GetColumnName()); Assert.Equal("varchar(64)", detailsProperty.GetColumnType()); Assert.Null(detailsProperty.IsFixedLength()); @@ -624,14 +642,13 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Equal("PIX", alternateIndex.GetDatabaseName()); Assert.Equal("AlternateId <> NULL", alternateIndex.GetFilter()); - Assert.Equal(new[] { alternateIndex }, principalBaseId.GetContainingIndexes()); + Assert.Equal([alternateIndex], principalBaseId.GetContainingIndexes()); var insertSproc = principalBase.GetInsertStoredProcedure()!; Assert.Equal("PrincipalBase_Insert", insertSproc.Name); Assert.Equal("TPC", insertSproc.Schema); Assert.Equal( - new[] - { + [ "Id", "PrincipalBaseId", "PrincipalDerivedId", @@ -647,7 +664,7 @@ protected virtual void AssertTpcSprocs(IModel model) "RefTypeArray", "RefTypeEnumerable", "Enum1" - }, + ], insertSproc.Parameters.Select(p => p.PropertyName)); Assert.Empty(insertSproc.ResultColumns); Assert.False(insertSproc.IsRowsAffectedReturned); @@ -664,8 +681,7 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Equal("PrincipalBase_Update", updateSproc.Name); Assert.Equal("TPC", updateSproc.Schema); Assert.Equal( - new[] - { + [ "PrincipalBaseId", "PrincipalDerivedId", "Enum1", @@ -681,7 +697,7 @@ protected virtual void AssertTpcSprocs(IModel model) "RefTypeArray", "RefTypeEnumerable", "Id" - }, + ], updateSproc.Parameters.Select(p => p.PropertyName)); Assert.Empty(updateSproc.ResultColumns); Assert.False(updateSproc.IsRowsAffectedReturned); @@ -730,8 +746,7 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Equal("Derived_Insert", insertSproc.Name); Assert.Equal("TPC", insertSproc.Schema); Assert.Equal( - new[] - { + [ "Id", "PrincipalBaseId", "PrincipalDerivedId", @@ -746,9 +761,9 @@ protected virtual void AssertTpcSprocs(IModel model) "RefTypeIList", "RefTypeArray", "RefTypeEnumerable" - }, + ], insertSproc.Parameters.Select(p => p.PropertyName)); - Assert.Equal(new[] { "Enum1" }, insertSproc.ResultColumns.Select(p => p.PropertyName)); + Assert.Equal(["Enum1"], insertSproc.ResultColumns.Select(p => p.PropertyName)); Assert.Null(insertSproc["foo"]); Assert.Same(principalDerived, insertSproc.EntityType); Assert.Equal("DerivedEnum", insertSproc.ResultColumns.Last().Name); @@ -764,8 +779,7 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Equal("Derived_Update", updateSproc.Name); Assert.Equal("Derived", updateSproc.Schema); Assert.Equal( - new[] - { + [ "PrincipalBaseId", "PrincipalDerivedId", "Enum1", @@ -781,7 +795,7 @@ protected virtual void AssertTpcSprocs(IModel model) "RefTypeArray", "RefTypeEnumerable", "Id" - }, + ], updateSproc.Parameters.Select(p => p.PropertyName)); Assert.Empty(updateSproc.ResultColumns); Assert.Empty(updateSproc.GetAnnotations()); @@ -793,7 +807,7 @@ protected virtual void AssertTpcSprocs(IModel model) deleteSproc = principalDerived.GetDeleteStoredProcedure()!; Assert.Equal("Derived_Delete", deleteSproc.Name); Assert.Equal("TPC", deleteSproc.Schema); - Assert.Equal(new[] { "Id" }, deleteSproc.Parameters.Select(p => p.PropertyName)); + Assert.Equal(["Id"], deleteSproc.Parameters.Select(p => p.PropertyName)); Assert.Empty(deleteSproc.ResultColumns); Assert.Same(principalDerived, deleteSproc.EntityType); Assert.Equal("Id_Original", deleteSproc.Parameters.Last().Name); @@ -832,7 +846,7 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Same(dependentNavigation.Inverse, dependentForeignKey.DependentToPrincipal); Assert.Same(dependentNavigation, dependentForeignKey.PrincipalToDependent); Assert.Equal(DeleteBehavior.ClientCascade, dependentForeignKey.DeleteBehavior); - Assert.Equal(new[] { "PrincipalId" }, dependentForeignKey.Properties.Select(p => p.Name)); + Assert.Equal(["PrincipalId"], dependentForeignKey.Properties.Select(p => p.Name)); var dependentBase = dependentNavigation.TargetEntityType; @@ -842,7 +856,7 @@ protected virtual void AssertTpcSprocs(IModel model) Assert.Same(dependentForeignKey, dependentBase.GetForeignKeys().Single()); Assert.Equal( - new[] { dependentBase, principalBase, principalDerived }, + [dependentBase, principalBase, principalDerived], model.GetEntityTypes()); } @@ -1031,7 +1045,7 @@ public virtual Task DbFunctions() Assert.Equal(getDataParameter.StoreType, getDataParameter.StoreFunctionParameter.StoreType); var getDataParameterless = model.FindDbFunction( - typeof(DbFunctionContext).GetMethod("GetData", new Type[0])!)!; + typeof(DbFunctionContext).GetMethod("GetData", [])!)!; Assert.Equal("GetAllData", getDataParameterless.Name); //Assert.Equal("dbo", getDataParameterless.Schema); Assert.Equal(typeof(DbFunctionContext).FullName + ".GetData()", getDataParameterless.ModelName); @@ -1127,7 +1141,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .Metadata.SetAnnotation("MyGuid", new Guid()); modelBuilder.HasDbFunction(typeof(DbFunctionContext).GetMethod(nameof(GetData), [typeof(int)])!); - modelBuilder.HasDbFunction(typeof(DbFunctionContext).GetMethod(nameof(GetData), new Type[0])!); + modelBuilder.HasDbFunction(typeof(DbFunctionContext).GetMethod(nameof(GetData), [])!); modelBuilder.Entity<Data>().ToFunction(typeof(DbFunctionContext).FullName + ".GetData()", f => f.HasName("GetAllData")) .HasNoKey(); diff --git a/test/EFCore.Relational.Specification.Tests/TestUtilities/PrecompiledQueryTestHelpers.cs b/test/EFCore.Relational.Specification.Tests/TestUtilities/PrecompiledQueryTestHelpers.cs index e6a7cd3e0e9..2e8c217efe7 100644 --- a/test/EFCore.Relational.Specification.Tests/TestUtilities/PrecompiledQueryTestHelpers.cs +++ b/test/EFCore.Relational.Specification.Tests/TestUtilities/PrecompiledQueryTestHelpers.cs @@ -76,17 +76,15 @@ public async Task FullSourceTest( using Microsoft.EntityFrameworkCore.Query; using Xunit; using static Microsoft.EntityFrameworkCore.Query.PrecompiledQueryRelationalTestBase; -//using Microsoft.EntityFrameworkCore.PrecompiledQueryTest; {sourceCode} """; // This turns on the interceptors feature for the designated namespace(s). var parseOptions = new CSharpParseOptions().WithFeatures( - new[] - { + [ new KeyValuePair<string, string>("InterceptorsPreviewNamespaces", "Microsoft.EntityFrameworkCore.GeneratedInterceptors") - }); + ]); var syntaxTree = CSharpSyntaxTree.ParseText(source, parseOptions, path: "Test.cs"); diff --git a/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs index 3a5500f009e..168c491f486 100644 --- a/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs @@ -231,8 +231,8 @@ public virtual async Task Project_collection_from_entity_type_with_owned() await using var context = contextFactory.CreateContext(); var results = await context.Set<TestEntityWithOwned>().Select(t => t.Ints).ToListAsync(); - Assert.True(results.Any(r => r?.SequenceEqual([1, 2]) == true)); - Assert.True(results.Any(r => r?.SequenceEqual([3, 4]) == true)); + Assert.Contains(results, r => r?.SequenceEqual([1, 2]) ?? false); + Assert.Contains(results, r => r?.SequenceEqual([3, 4]) ?? false); } private class TestEntityWithOwned diff --git a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs index f008e6c6a53..c0e31b628de 100644 --- a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs +++ b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs @@ -32,18 +32,17 @@ public virtual Task SimpleModel() }); }, model => Assert.Single(model.GetEntityTypes()), - // Blocked by dotnet/runtime/issues/89439 - //c => - //{ - // c.Add(new DependentDerived<int>(1, "one")); - - // c.SaveChanges(); - - // var stored = c.Set<DependentDerived<int>>().Single(); - // Assert.Equal(0, stored.Id); - // Assert.Equal(1, stored.GetId()); - // Assert.Equal("one", stored.GetData()); - //}, + async c => + { + c.Add(new DependentDerived<int>(1, "one")); + + await c.SaveChangesAsync(); + + var stored = await c.Set<DependentDerived<int>>().SingleAsync(); + Assert.Equal(0, stored.Id); + Assert.Equal(1, stored.GetId()); + Assert.Equal("one", stored.GetData()); + }, options: new CompiledModelCodeGenerationOptions { UseNullableReferenceTypes = true }, additionalSourceFiles: [ @@ -81,27 +80,26 @@ public virtual Task BigModel() => Test( modelBuilder => BuildBigModel(modelBuilder, jsonColumns: false), model => AssertBigModel(model, jsonColumns: false), - // Blocked by dotnet/runtime/issues/89439 - //c => - //{ - // var principalDerived = new PrincipalDerived<DependentBase<byte?>> - // { - // AlternateId = new Guid(), - // Dependent = new DependentBase<byte?>(1), - // Owned = new OwnedType(c) - // }; - - // var principalBase = c.Model.FindEntityType(typeof(PrincipalBase))!; - // var principalId = principalBase.FindProperty(nameof(PrincipalBase.Id))!; - // if (principalId.ValueGenerated == ValueGenerated.Never) - // { - // principalDerived.Id = 10; - // } - - // c.Add(principalDerived); - - // c.SaveChanges(); - //}, + async c => + { + var principalDerived = new PrincipalDerived<DependentBase<byte?>> + { + AlternateId = new Guid(), + Dependent = new DependentBase<byte?>(1), + Owned = new OwnedType(c) + }; + + var principalBase = c.Model.FindEntityType(typeof(PrincipalBase))!; + var principalId = principalBase.FindProperty(nameof(PrincipalBase.Id))!; + if (principalId.ValueGenerated == ValueGenerated.Never) + { + principalDerived.Id = 10; + } + + c.Add(principalDerived); + + await c.SaveChangesAsync(); + }, options: new CompiledModelCodeGenerationOptions { UseNullableReferenceTypes = true }); protected virtual void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumns) @@ -116,8 +114,6 @@ protected virtual void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumns eb.Property(e => e.AlternateId) .UsePropertyAccessMode(PropertyAccessMode.FieldDuringConstruction); - eb.HasIndex(e => new { e.AlternateId, e.Id }); - eb.HasKey(e => new { e.Id, e.AlternateId }); eb.Property(e => e.Id).ValueGeneratedNever(); @@ -170,8 +166,7 @@ protected virtual void BuildBigModel(ModelBuilder modelBuilder, bool jsonColumns .UsingEntity( jb => { - jb.Property<byte[]>("rowid") - .IsRowVersion(); + jb.Property<byte[]>("rowid"); }); }); @@ -325,30 +320,18 @@ protected virtual void AssertBigModel(IModel model, bool jsonColumns) Assert.NotNull(principalId.GetKeyValueComparer()); var principalAlternateId = principalBase.FindProperty(nameof(PrincipalBase.AlternateId))!; - var compositeIndex = principalBase.GetIndexes().Single(); - Assert.Equal(PropertyAccessMode.FieldDuringConstruction, principalAlternateId.GetPropertyAccessMode()); - Assert.Empty(compositeIndex.GetAnnotations()); - Assert.Equal(new[] { principalAlternateId, principalId }, compositeIndex.Properties); - Assert.False(compositeIndex.IsUnique); - Assert.Null(compositeIndex.Name); - - Assert.Equal(new[] { compositeIndex }, principalAlternateId.GetContainingIndexes()); - Assert.Equal(2, principalBase.GetKeys().Count()); - - var principalAlternateKey = principalBase.GetKeys().First(); - Assert.Same(principalId, principalAlternateKey.Properties.Single()); + var principalAlternateKey = principalBase.GetKeys().Single(k => k.Properties.Count == 1 && principalId == k.Properties.Single()); Assert.False(principalAlternateKey.IsPrimaryKey()); - var principalKey = principalBase.GetKeys().Last(); - Assert.Equal(new[] { principalId, principalAlternateId }, principalKey.Properties); + var principalKey = principalBase.GetKeys().Single(k => k.Properties.Count == 2 && k.Properties.SequenceEqual([principalId, principalAlternateId])); Assert.True(principalKey.IsPrimaryKey()); - Assert.Equal(new[] { principalAlternateKey, principalKey }, principalId.GetContainingKeys()); + Assert.Equal([principalAlternateKey, principalKey], principalId.GetContainingKeys()); var referenceOwnedNavigation = principalBase.GetNavigations().Single(); Assert.Equal( - new[] { CoreAnnotationNames.EagerLoaded }, + [CoreAnnotationNames.EagerLoaded], referenceOwnedNavigation.GetAnnotations().Select(a => a.Name)); Assert.Equal(nameof(PrincipalBase.Owned), referenceOwnedNavigation.Name); Assert.False(referenceOwnedNavigation.IsCollection); @@ -422,7 +405,6 @@ protected virtual void AssertBigModel(IModel model, bool jsonColumns) Assert.False(principalDerived.IsOwned()); Assert.IsType<ConstructorBinding>(principalDerived.ConstructorBinding); Assert.Equal(ChangeTrackingStrategy.Snapshot, principalDerived.GetChangeTrackingStrategy()); - Assert.Equal("PrincipalDerived<DependentBase<byte?>>", principalDerived.GetDiscriminatorValue()); Assert.Equal(2, principalDerived.GetDeclaredNavigations().Count()); var dependentNavigation = principalDerived.GetDeclaredNavigations().First(); @@ -485,7 +467,7 @@ protected virtual void AssertBigModel(IModel model, bool jsonColumns) Assert.Same( derivedSkipNavigation.Inverse, derivedSkipNavigation.Inverse.ForeignKey.GetReferencingSkipNavigations().Single()); - Assert.Equal(new[] { derivedSkipNavigation.Inverse, derivedSkipNavigation }, principalDerived.GetSkipNavigations()); + Assert.Equal([derivedSkipNavigation.Inverse, derivedSkipNavigation], principalDerived.GetSkipNavigations()); var joinType = derivedSkipNavigation.JoinEntityType; @@ -500,15 +482,14 @@ protected virtual void AssertBigModel(IModel model, bool jsonColumns) Assert.Equal(ChangeTrackingStrategy.Snapshot, joinType.GetChangeTrackingStrategy()); Assert.Null(joinType.GetQueryFilter()); - var rowid = joinType.GetProperties().Single(p => !p.IsForeignKey()); + var rowid = joinType.FindProperty("rowid")!; Assert.Equal(typeof(byte[]), rowid.ClrType); Assert.True(rowid.IsIndexerProperty()); Assert.Same(joinType.FindIndexerPropertyInfo(), rowid.PropertyInfo); Assert.Null(rowid.FieldInfo); Assert.True(rowid.IsNullable); + Assert.False(rowid.IsForeignKey()); Assert.False(rowid.IsShadowProperty()); - Assert.True(rowid.IsConcurrencyToken); - Assert.Equal(ValueGenerated.OnAddOrUpdate, rowid.ValueGenerated); Assert.Null(rowid.GetValueConverter()); Assert.NotNull(rowid.GetValueComparer()); Assert.NotNull(rowid.GetKeyValueComparer()); @@ -625,7 +606,6 @@ protected virtual void BuildComplexTypesModel(ModelBuilder modelBuilder) .UsePropertyAccessMode(PropertyAccessMode.FieldDuringConstruction) .HasMaxLength(64) .HasPrecision(3, 2) - .IsRowVersion() .HasAnnotation("foo", "bar"); eb.Ignore(e => e.Context); eb.ComplexProperty(o => o.Principal, cb => @@ -684,11 +664,7 @@ protected virtual void AssertComplexTypes(IModel model) Assert.Equal(typeof(string), detailsProperty.FieldInfo!.FieldType); Assert.Equal("_details", detailsProperty.FieldInfo.Name); Assert.True(detailsProperty.IsNullable); - Assert.Equal(ValueGenerated.OnAddOrUpdate, detailsProperty.ValueGenerated); - Assert.Equal(PropertySaveBehavior.Ignore, detailsProperty.GetAfterSaveBehavior()); - Assert.Equal(PropertySaveBehavior.Ignore, detailsProperty.GetBeforeSaveBehavior()); Assert.False(detailsProperty.IsUnicode()); - Assert.True(detailsProperty.IsConcurrencyToken); Assert.Equal(64, detailsProperty.GetMaxLength()); Assert.Equal(3, detailsProperty.GetPrecision()); Assert.Equal(2, detailsProperty.GetScale()); @@ -706,7 +682,7 @@ protected virtual void AssertComplexTypes(IModel model) Assert.Equal(principalBase, principalDerived.BaseType); Assert.Equal( - new[] { principalBase, principalDerived }, + [principalBase, principalDerived], model.GetEntityTypes()); } @@ -1154,6 +1130,7 @@ public class PrincipalBase : AbstractBase } public class PrincipalDerived<TDependent> : PrincipalBase + where TDependent : class { public TDependent? Dependent { get; set; } protected ICollection<OwnedType> ManyOwned = null!; @@ -1528,8 +1505,10 @@ private void AssertBaseline( { File.WriteAllText(fullFilePath, file.Code); } - - exceptions.Add(new Exception($"Difference found in {file.Path}", ex)); + else + { + exceptions.Add(new Exception($"Difference found in {file.Path}", ex)); + } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs index f057e7ef992..92f584448c3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); principalId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -78,11 +77,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -91,17 +90,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalAlternateId)); @@ -113,11 +112,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); enumDiscriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enumDiscriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -126,25 +125,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumDiscriminator.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value), + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum1, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value))); + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))))); enumDiscriminator.SetSentinelFromProviderValue(0); enumDiscriminator.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -155,20 +154,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + byte? (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => !(DependentBaseUnsafeAccessors<byte?>.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => !(DependentBaseUnsafeAccessors<byte?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(id, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(id), - (ValueBuffer valueBuffer) => valueBuffer[3]); + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(id, 3), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(id), + object (ValueBuffer valueBuffer) => valueBuffer[3]); id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -177,21 +176,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); id.SetValueComparer(new NullableValueComparer<byte>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<byte>(id.TypeMapping.KeyComparer)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { principalId, principalAlternateId }); @@ -233,19 +231,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -253,7 +251,6 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -264,19 +261,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt lazyLoadingEnabled: false); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<byte>>>(dependent), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<byte?>>(dependent), null); dependent.SetPropertyIndexes( index: 2, @@ -298,24 +295,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id))); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 4, @@ -338,11 +335,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<byte?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<byte?> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs index a9a85f6f7c7..acd8b9d1f75 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 20, unicode: false); data.SetGetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[4]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[4]); data.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -61,17 +60,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "char(20)", size: 20, @@ -79,7 +78,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dbType: System.Data.DbType.AnsiStringFixedLength)); data.AddAnnotation("Relational:IsFixedLength", true); data.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var money = runtimeEntityType.AddProperty( "Money", @@ -88,11 +86,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas scale: 3, sentinel: 0m); money.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), - (ValueBuffer valueBuffer) => valueBuffer[5]); + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), + object (ValueBuffer valueBuffer) => valueBuffer[5]); money.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -101,17 +99,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); money.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(9,3)", precision: 9, @@ -131,24 +129,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var money = runtimeEntityType.FindProperty("Money")!; var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>, string, decimal>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data)), ((ValueComparer<decimal>)((IProperty)money).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(money))); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?, string, decimal>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data))), ((ValueComparer<decimal>)(((IProperty)money).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(money))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default, source.ContainsKey("Money") ? (decimal)source["Money"] : 0M)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("Money") ? ((decimal)(source["Money"])) : 0M))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity8)); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity8)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 6, @@ -169,8 +167,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<byte?> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs index 0b1bdc09403..70a977c333a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs @@ -7,7 +7,6 @@ using System.Net; using System.Net.NetworkInformation; using System.Reflection; -using System.Runtime.CompilerServices; using System.Text; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -47,20 +46,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueConverter: new CompiledModelTestBase.ManyTypesIdConverter()); id.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); id.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : (entry.FlaggedAsTemporary(0) && ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -69,29 +68,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)), + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.ManyTypesId, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)))); + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)))); id.SetCurrentValueComparer(new CurrentProviderValueComparer<CompiledModelTestBase.ManyTypesId, int>(id)); id.SetSentinelFromProviderValue(0); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id", "TestNamespace") }); var @bool = runtimeEntityType.AddProperty( "Bool", @@ -100,20 +98,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); @bool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance) == false); @bool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), - (ValueBuffer valueBuffer) => valueBuffer[1]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), + object (ValueBuffer valueBuffer) => valueBuffer[1]); @bool.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -122,19 +120,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @bool.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)); @bool.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @bool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool", "TestNamespace") }); var boolArray = runtimeEntityType.AddProperty( "BoolArray", @@ -142,20 +139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance) == null); + bool[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity) == null, + bool[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance) == null); boolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), - (ValueBuffer valueBuffer) => valueBuffer[2]); + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), + bool[] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), + object (ValueBuffer valueBuffer) => valueBuffer[2]); boolArray.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -164,17 +161,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -186,19 +183,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))); boolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray", "TestNamespace") }); var boolNestedCollection = runtimeEntityType.AddProperty( "BoolNestedCollection", @@ -206,20 +202,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance) == null); + bool[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) == null, + bool[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance) == null); boolNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[3]); + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), + bool[][] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[3]); boolNestedCollection.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -228,17 +224,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -252,17 +248,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -274,19 +270,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)))); boolNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection", "TestNamespace") }); var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", @@ -294,20 +289,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance) == false); boolToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -316,33 +311,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]), + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, string>( JsonStringReaderWriter.Instance, new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]))); + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))))); boolToStringConverterProperty.SetSentinelFromProviderValue("A"); boolToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty", "TestNamespace") }); var boolToTwoValuesConverterProperty = runtimeEntityType.AddProperty( "BoolToTwoValuesConverterProperty", @@ -350,20 +344,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToTwoValuesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToTwoValuesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToTwoValuesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance) == false); boolToTwoValuesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -372,28 +366,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToTwoValuesConverterProperty.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1), + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, byte>( JsonByteReaderWriter.Instance, new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1))); + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1))); boolToTwoValuesConverterProperty.SetSentinelFromProviderValue((byte)0); boolToTwoValuesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToTwoValuesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty", "TestNamespace") }); var boolToZeroOneConverterProperty = runtimeEntityType.AddProperty( "BoolToZeroOneConverterProperty", @@ -402,20 +395,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToZeroOneConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new BoolToZeroOneConverter<short>()); boolToZeroOneConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance) == false); boolToZeroOneConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[6]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -424,28 +417,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToZeroOneConverterProperty.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1), + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1))); + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1))); boolToZeroOneConverterProperty.SetSentinelFromProviderValue((short)0); boolToZeroOneConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToZeroOneConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty", "TestNamespace") }); var bytes = runtimeEntityType.AddProperty( "Bytes", @@ -453,20 +445,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance) == null); bytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), - (ValueBuffer valueBuffer) => valueBuffer[7]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), + object (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -475,22 +467,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytes.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); bytes.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes", "TestNamespace") }); var bytesArray = runtimeEntityType.AddProperty( "BytesArray", @@ -498,20 +489,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance) == null); bytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -520,17 +511,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -542,22 +533,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); bytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray", "TestNamespace") }); var bytesNestedCollection = runtimeEntityType.AddProperty( "BytesNestedCollection", @@ -565,20 +555,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance) == null); bytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[9]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[9]); bytesNestedCollection.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -587,17 +577,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -611,17 +601,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -633,22 +623,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None))); bytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection", "TestNamespace") }); var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", @@ -658,20 +647,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueConverter: new BytesToStringConverter(), valueComparer: new ArrayStructuralComparer<byte>()); bytesToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance) == null); bytesToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[10]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -680,32 +669,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)), + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<byte[], string>( JsonStringReaderWriter.Instance, new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)))); + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); bytesToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty", "TestNamespace") }); var castingConverterProperty = runtimeEntityType.AddProperty( "CastingConverterProperty", @@ -714,20 +702,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CastingConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CastingConverter<int, decimal>()); castingConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance) == 0); castingConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[11]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -736,28 +724,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); castingConverterProperty.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), converter: new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v), + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v))); + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))))); castingConverterProperty.SetSentinelFromProviderValue(0m); castingConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - castingConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty", "TestNamespace") }); var @char = runtimeEntityType.AddProperty( "Char", @@ -765,20 +752,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Char", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Char>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @char.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance) == '\0'); @char.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), - (ValueBuffer valueBuffer) => valueBuffer[12]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), + object (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -787,33 +774,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @char.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); @char.SetSentinelFromProviderValue("\0"); @char.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @char.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char", "TestNamespace") }); var charArray = runtimeEntityType.AddProperty( "CharArray", @@ -821,20 +807,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance) == null); + char[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity) == null, + char[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance) == null); charArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), - (ValueBuffer valueBuffer) => valueBuffer[13]); + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), + char[] (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), + object (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -843,17 +829,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -862,43 +848,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))); charArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray", "TestNamespace") }); var charNestedCollection = runtimeEntityType.AddProperty( "CharNestedCollection", @@ -906,20 +891,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance) == null); + char[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) == null, + char[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance) == null); charNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[14]); + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), + char[][] (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[14]); charNestedCollection.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -928,17 +913,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -948,29 +933,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<char[][], char[]>( new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -979,43 +964,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))))); charNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection", "TestNamespace") }); var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", @@ -1024,20 +1008,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CharToStringConverter()); charToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance) == '\0'); charToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -1046,17 +1030,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nchar(1)", size: 1, @@ -1064,17 +1048,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fixedLength: true, dbType: System.Data.DbType.StringFixedLength), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); charToStringConverterProperty.SetSentinelFromProviderValue("\0"); charToStringConverterProperty.AddAnnotation("Relational:IsFixedLength", true); charToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty", "TestNamespace") }); var dateOnly = runtimeEntityType.AddProperty( "DateOnly", @@ -1083,20 +1066,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateOnly(1, 1, 1)); dateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance) == default(DateOnly)); dateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[16]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -1105,19 +1088,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnly.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)); dateOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly", "TestNamespace") }); var dateOnlyArray = runtimeEntityType.AddProperty( "DateOnlyArray", @@ -1125,20 +1107,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance) == null); + DateOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) == null, + DateOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance) == null); dateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), + DateOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1147,17 +1129,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), keyComparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1169,19 +1151,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))); dateOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray", "TestNamespace") }); var dateOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "DateOnlyToStringConverterProperty", @@ -1190,20 +1171,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateOnlyToStringConverter()); dateOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance) == default(DateOnly)); dateOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1212,33 +1193,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(10)", size: 10, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); dateOnlyToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01"); dateOnlyToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty", "TestNamespace") }); var dateTime = runtimeEntityType.AddProperty( "DateTime", @@ -1247,20 +1227,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance) == default(DateTime)); dateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[19]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), + object (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1269,19 +1249,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTime.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); dateTime.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime", "TestNamespace") }); var dateTimeArray = runtimeEntityType.AddProperty( "DateTimeArray", @@ -1289,20 +1268,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance) == null); + DateTime[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity) == null, + DateTime[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance) == null); dateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[20]); + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1311,17 +1290,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1333,19 +1312,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); dateTimeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray", "TestNamespace") }); var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBinaryConverterProperty", @@ -1354,20 +1332,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBinaryConverter()); dateTimeOffsetToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1376,28 +1354,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBinaryConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); dateTimeOffsetToBinaryConverterProperty.SetSentinelFromProviderValue(0L); dateTimeOffsetToBinaryConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty", "TestNamespace") }); var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBytesConverterProperty", @@ -1406,20 +1383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBytesConverter()); dateTimeOffsetToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1428,31 +1405,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(12)", size: 12), converter: new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); dateTimeOffsetToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); dateTimeOffsetToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty", "TestNamespace") }); var dateTimeOffsetToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToStringConverterProperty", @@ -1461,20 +1437,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToStringConverter()); dateTimeOffsetToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1483,33 +1459,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); dateTimeOffsetToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00+00:00"); dateTimeOffsetToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty", "TestNamespace") }); var dateTimeToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeToBinaryConverterProperty", @@ -1518,20 +1493,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToBinaryConverter()); dateTimeToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance) == default(DateTime)); dateTimeToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[24]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1540,28 +1515,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToBinaryConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)), + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)))); + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)))); dateTimeToBinaryConverterProperty.SetSentinelFromProviderValue(0L); dateTimeToBinaryConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty", "TestNamespace") }); var dateTimeToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeToStringConverterProperty", @@ -1570,20 +1544,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToStringConverter()); dateTimeToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance) == default(DateTime)); dateTimeToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[25]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1592,33 +1566,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); dateTimeToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00"); dateTimeToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty", "TestNamespace") }); var dateTimeToTicksConverterProperty = runtimeEntityType.AddProperty( "DateTimeToTicksConverterProperty", @@ -1627,20 +1600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTimeToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance) == default(DateTime)); dateTimeToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1649,19 +1622,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToTicksConverterProperty.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); dateTimeToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty", "TestNamespace") }); var @decimal = runtimeEntityType.AddProperty( "Decimal", @@ -1670,20 +1642,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Decimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0m); @decimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance) == 0M); @decimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[27]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), + object (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1692,19 +1664,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @decimal.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)); @decimal.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @decimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal", "TestNamespace") }); var decimalArray = runtimeEntityType.AddProperty( "DecimalArray", @@ -1712,20 +1683,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); decimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance) == null); + decimal[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity) == null, + decimal[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance) == null); decimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[28]); + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), + decimal[] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -1734,17 +1705,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), keyComparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1756,19 +1727,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))); decimalArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray", "TestNamespace") }); var decimalNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToBytesConverterProperty", @@ -1777,20 +1747,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<decimal>()); decimalNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance) == 0M); decimalNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[29]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -1799,31 +1769,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)), + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)))); + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))))); decimalNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); decimalNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty", "TestNamespace") }); var decimalNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToStringConverterProperty", @@ -1832,20 +1801,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<decimal>()); decimalNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance) == 0M); decimalNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -1854,33 +1823,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, string>( JsonStringReaderWriter.Instance, new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); decimalNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); decimalNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty", "TestNamespace") }); var @double = runtimeEntityType.AddProperty( "Double", @@ -1889,20 +1857,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Double>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0.0); @double.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance).Equals(0D)); @double.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), - (ValueBuffer valueBuffer) => valueBuffer[31]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), + object (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -1911,19 +1879,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @double.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)); @double.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @double.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double", "TestNamespace") }); var doubleArray = runtimeEntityType.AddProperty( "DoubleArray", @@ -1931,20 +1898,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); doubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance) == null); + double[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity) == null, + double[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance) == null); doubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[32]); + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), + double[] (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -1953,17 +1920,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), keyComparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1975,19 +1942,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))); doubleArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray", "TestNamespace") }); var doubleNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToBytesConverterProperty", @@ -1996,20 +1962,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<double>()); doubleNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance).Equals(0D)); doubleNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[33]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -2018,31 +1984,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(8)", size: 8), converter: new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)), + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)))); + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))))); doubleNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }); doubleNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty", "TestNamespace") }); var doubleNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToStringConverterProperty", @@ -2051,20 +2016,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<double>()); doubleNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance).Equals(0D)); doubleNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[34]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -2073,33 +2038,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, string>( JsonStringReaderWriter.Instance, new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); doubleNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); doubleNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty", "TestNamespace") }); var enum16 = runtimeEntityType.AddProperty( "Enum16", @@ -2107,20 +2071,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), - (ValueBuffer valueBuffer) => valueBuffer[35]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), + object (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -2129,28 +2093,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); enum16.SetSentinelFromProviderValue((short)0); enum16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16", "TestNamespace") }); var enum16Array = runtimeEntityType.AddProperty( "Enum16Array", @@ -2158,20 +2121,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance) == null); enum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[36]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -2180,17 +2143,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2199,38 +2162,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); enum16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array", "TestNamespace") }); var enum16AsString = runtimeEntityType.AddProperty( "Enum16AsString", @@ -2239,20 +2201,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[37]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -2261,33 +2223,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); enum16AsString.SetSentinelFromProviderValue("Default"); enum16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString", "TestNamespace") }); var enum16AsStringArray = runtimeEntityType.AddProperty( "Enum16AsStringArray", @@ -2295,20 +2256,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance) == null); enum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[38]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2317,17 +2278,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2336,43 +2297,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); enum16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray", "TestNamespace") }); var enum16AsStringCollection = runtimeEntityType.AddProperty( "Enum16AsStringCollection", @@ -2380,20 +2340,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance) == null); enum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[39]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( index: 39, originalValueIndex: 39, @@ -2402,17 +2362,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2421,43 +2381,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); enum16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection", "TestNamespace") }); var enum16Collection = runtimeEntityType.AddProperty( "Enum16Collection", @@ -2465,20 +2424,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance) == null); enum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[40]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( index: 40, originalValueIndex: 40, @@ -2487,17 +2446,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2506,38 +2465,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); enum16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection", "TestNamespace") }); var enum32 = runtimeEntityType.AddProperty( "Enum32", @@ -2545,20 +2503,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), - (ValueBuffer valueBuffer) => valueBuffer[41]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), + object (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( index: 41, originalValueIndex: 41, @@ -2567,28 +2525,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enum32.SetSentinelFromProviderValue(0); enum32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32", "TestNamespace") }); var enum32Array = runtimeEntityType.AddProperty( "Enum32Array", @@ -2596,20 +2553,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance) == null); enum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[42]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( index: 42, originalValueIndex: 42, @@ -2618,17 +2575,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2637,38 +2594,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); enum32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array", "TestNamespace") }); var enum32AsString = runtimeEntityType.AddProperty( "Enum32AsString", @@ -2677,20 +2633,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[43]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( index: 43, originalValueIndex: 43, @@ -2699,33 +2655,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enum32AsString.SetSentinelFromProviderValue("Default"); enum32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString", "TestNamespace") }); var enum32AsStringArray = runtimeEntityType.AddProperty( "Enum32AsStringArray", @@ -2733,20 +2688,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance) == null); enum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[44]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( index: 44, originalValueIndex: 44, @@ -2755,17 +2710,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2774,43 +2729,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); enum32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray", "TestNamespace") }); var enum32AsStringCollection = runtimeEntityType.AddProperty( "Enum32AsStringCollection", @@ -2818,20 +2772,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance) == null); enum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[45]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( index: 45, originalValueIndex: 45, @@ -2840,17 +2794,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2859,43 +2813,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); enum32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection", "TestNamespace") }); var enum32Collection = runtimeEntityType.AddProperty( "Enum32Collection", @@ -2903,20 +2856,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance) == null); enum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[46]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( index: 46, originalValueIndex: 46, @@ -2925,17 +2878,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2944,38 +2897,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); enum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection", "TestNamespace") }); var enum32NestedCollection = runtimeEntityType.AddProperty( "Enum32NestedCollection", @@ -2983,20 +2935,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance) == null); + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) == null, + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance) == null); enum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[47]); + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[47]); enum32NestedCollection.SetPropertyIndexes( index: 47, originalValueIndex: 47, @@ -3005,17 +2957,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3026,8 +2978,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( @@ -3035,21 +2987,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3059,29 +3011,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3090,38 +3042,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); enum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection", "TestNamespace") }); var enum64 = runtimeEntityType.AddProperty( "Enum64", @@ -3129,20 +3080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), - (ValueBuffer valueBuffer) => valueBuffer[48]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), + object (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( index: 48, originalValueIndex: 48, @@ -3151,28 +3102,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); enum64.SetSentinelFromProviderValue(0L); enum64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64", "TestNamespace") }); var enum64Array = runtimeEntityType.AddProperty( "Enum64Array", @@ -3180,20 +3130,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance) == null); enum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[49]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( index: 49, originalValueIndex: 49, @@ -3202,17 +3152,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3221,38 +3171,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); enum64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array", "TestNamespace") }); var enum64AsString = runtimeEntityType.AddProperty( "Enum64AsString", @@ -3261,20 +3210,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[50]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( index: 50, originalValueIndex: 50, @@ -3283,33 +3232,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); enum64AsString.SetSentinelFromProviderValue("Default"); enum64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString", "TestNamespace") }); var enum64AsStringArray = runtimeEntityType.AddProperty( "Enum64AsStringArray", @@ -3317,20 +3265,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance) == null); enum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[51]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( index: 51, originalValueIndex: 51, @@ -3339,17 +3287,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3358,43 +3306,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); enum64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray", "TestNamespace") }); var enum64AsStringCollection = runtimeEntityType.AddProperty( "Enum64AsStringCollection", @@ -3402,20 +3349,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance) == null); enum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[52]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( index: 52, originalValueIndex: 52, @@ -3424,17 +3371,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3443,43 +3390,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); enum64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection", "TestNamespace") }); var enum64Collection = runtimeEntityType.AddProperty( "Enum64Collection", @@ -3487,20 +3433,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance) == null); enum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[53]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( index: 53, originalValueIndex: 53, @@ -3509,17 +3455,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3528,38 +3474,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); enum64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection", "TestNamespace") }); var enum8 = runtimeEntityType.AddProperty( "Enum8", @@ -3567,20 +3512,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), - (ValueBuffer valueBuffer) => valueBuffer[54]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), + object (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( index: 54, originalValueIndex: 54, @@ -3589,28 +3534,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); enum8.SetSentinelFromProviderValue((short)0); enum8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8", "TestNamespace") }); var enum8Array = runtimeEntityType.AddProperty( "Enum8Array", @@ -3618,20 +3562,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance) == null); enum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[55]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( index: 55, originalValueIndex: 55, @@ -3640,17 +3584,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3659,38 +3603,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); enum8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array", "TestNamespace") }); var enum8AsString = runtimeEntityType.AddProperty( "Enum8AsString", @@ -3699,20 +3642,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[56]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( index: 56, originalValueIndex: 56, @@ -3721,33 +3664,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); enum8AsString.SetSentinelFromProviderValue("Default"); enum8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString", "TestNamespace") }); var enum8AsStringArray = runtimeEntityType.AddProperty( "Enum8AsStringArray", @@ -3755,20 +3697,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance) == null); enum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[57]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( index: 57, originalValueIndex: 57, @@ -3777,17 +3719,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3796,43 +3738,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); enum8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray", "TestNamespace") }); var enum8AsStringCollection = runtimeEntityType.AddProperty( "Enum8AsStringCollection", @@ -3840,20 +3781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance) == null); enum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[58]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( index: 58, originalValueIndex: 58, @@ -3862,17 +3803,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3881,43 +3822,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); enum8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection", "TestNamespace") }); var enum8Collection = runtimeEntityType.AddProperty( "Enum8Collection", @@ -3925,20 +3865,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance) == null); enum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[59]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( index: 59, originalValueIndex: 59, @@ -3947,17 +3887,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3966,38 +3906,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); enum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection", "TestNamespace") }); var enum8NestedCollection = runtimeEntityType.AddProperty( "Enum8NestedCollection", @@ -4005,20 +3944,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance) == null); enum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[60]); + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[60]); enum8NestedCollection.SetPropertyIndexes( index: 60, originalValueIndex: 60, @@ -4027,17 +3966,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4047,29 +3986,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4078,38 +4017,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))); enum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection", "TestNamespace") }); var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", @@ -4118,20 +4056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToNumberConverter<CompiledModelTestBase.Enum32, int>()); enumToNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[61]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( index: 61, originalValueIndex: 61, @@ -4140,28 +4078,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enumToNumberConverterProperty.SetSentinelFromProviderValue(0); enumToNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumToNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty", "TestNamespace") }); var enumToStringConverterProperty = runtimeEntityType.AddProperty( "EnumToStringConverterProperty", @@ -4170,20 +4107,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToStringConverter<CompiledModelTestBase.Enum32>()); enumToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[62]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( index: 62, originalValueIndex: 62, @@ -4192,33 +4129,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enumToStringConverterProperty.SetSentinelFromProviderValue("Default"); enumToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty", "TestNamespace") }); var enumU16 = runtimeEntityType.AddProperty( "EnumU16", @@ -4226,20 +4162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[63]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), + object (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( index: 63, originalValueIndex: 63, @@ -4248,28 +4184,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); enumU16.SetSentinelFromProviderValue(0); enumU16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16", "TestNamespace") }); var enumU16Array = runtimeEntityType.AddProperty( "EnumU16Array", @@ -4277,20 +4212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance) == null); enumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[64]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( index: 64, originalValueIndex: 64, @@ -4299,17 +4234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4318,38 +4253,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); enumU16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array", "TestNamespace") }); var enumU16AsString = runtimeEntityType.AddProperty( "EnumU16AsString", @@ -4358,20 +4292,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[65]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( index: 65, originalValueIndex: 65, @@ -4380,33 +4314,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); enumU16AsString.SetSentinelFromProviderValue("Min"); enumU16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString", "TestNamespace") }); var enumU16AsStringArray = runtimeEntityType.AddProperty( "EnumU16AsStringArray", @@ -4414,20 +4347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance) == null); enumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[66]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( index: 66, originalValueIndex: 66, @@ -4436,17 +4369,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4455,43 +4388,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); enumU16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray", "TestNamespace") }); var enumU16AsStringCollection = runtimeEntityType.AddProperty( "EnumU16AsStringCollection", @@ -4499,20 +4431,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance) == null); enumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[67]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( index: 67, originalValueIndex: 67, @@ -4521,17 +4453,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4540,43 +4472,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); enumU16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection", "TestNamespace") }); var enumU16Collection = runtimeEntityType.AddProperty( "EnumU16Collection", @@ -4584,20 +4515,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance) == null); enumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( index: 68, originalValueIndex: 68, @@ -4606,17 +4537,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4625,38 +4556,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); enumU16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection", "TestNamespace") }); var enumU32 = runtimeEntityType.AddProperty( "EnumU32", @@ -4664,20 +4594,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[69]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), + object (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( index: 69, originalValueIndex: 69, @@ -4686,28 +4616,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); enumU32.SetSentinelFromProviderValue(0L); enumU32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32", "TestNamespace") }); var enumU32Array = runtimeEntityType.AddProperty( "EnumU32Array", @@ -4715,20 +4644,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance) == null); enumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[70]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( index: 70, originalValueIndex: 70, @@ -4737,17 +4666,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4756,38 +4685,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); enumU32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array", "TestNamespace") }); var enumU32AsString = runtimeEntityType.AddProperty( "EnumU32AsString", @@ -4796,20 +4724,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[71]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( index: 71, originalValueIndex: 71, @@ -4818,33 +4746,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); enumU32AsString.SetSentinelFromProviderValue("Min"); enumU32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString", "TestNamespace") }); var enumU32AsStringArray = runtimeEntityType.AddProperty( "EnumU32AsStringArray", @@ -4852,20 +4779,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance) == null); enumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[72]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( index: 72, originalValueIndex: 72, @@ -4874,17 +4801,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4893,43 +4820,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); enumU32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray", "TestNamespace") }); var enumU32AsStringCollection = runtimeEntityType.AddProperty( "EnumU32AsStringCollection", @@ -4937,20 +4863,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance) == null); enumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[73]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( index: 73, originalValueIndex: 73, @@ -4959,17 +4885,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4978,43 +4904,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); enumU32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection", "TestNamespace") }); var enumU32Collection = runtimeEntityType.AddProperty( "EnumU32Collection", @@ -5022,20 +4947,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance) == null); enumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( index: 74, originalValueIndex: 74, @@ -5044,17 +4969,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5063,38 +4988,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); enumU32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection", "TestNamespace") }); var enumU64 = runtimeEntityType.AddProperty( "EnumU64", @@ -5102,20 +5026,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[75]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), + object (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( index: 75, originalValueIndex: 75, @@ -5124,32 +5048,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); enumU64.SetSentinelFromProviderValue(0m); enumU64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64", "TestNamespace") }); var enumU64Array = runtimeEntityType.AddProperty( "EnumU64Array", @@ -5157,20 +5080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance) == null); enumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[76]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( index: 76, originalValueIndex: 76, @@ -5179,17 +5102,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5198,42 +5121,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); enumU64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array", "TestNamespace") }); var enumU64AsString = runtimeEntityType.AddProperty( "EnumU64AsString", @@ -5242,20 +5164,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[77]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( index: 77, originalValueIndex: 77, @@ -5264,33 +5186,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); enumU64AsString.SetSentinelFromProviderValue("Min"); enumU64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString", "TestNamespace") }); var enumU64AsStringArray = runtimeEntityType.AddProperty( "EnumU64AsStringArray", @@ -5298,20 +5219,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance) == null); enumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[78]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( index: 78, originalValueIndex: 78, @@ -5320,17 +5241,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5339,43 +5260,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); enumU64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray", "TestNamespace") }); var enumU64AsStringCollection = runtimeEntityType.AddProperty( "EnumU64AsStringCollection", @@ -5383,20 +5303,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance) == null); enumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[79]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( index: 79, originalValueIndex: 79, @@ -5405,17 +5325,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5424,43 +5344,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); enumU64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection", "TestNamespace") }); var enumU64Collection = runtimeEntityType.AddProperty( "EnumU64Collection", @@ -5468,20 +5387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance) == null); enumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( index: 80, originalValueIndex: 80, @@ -5490,17 +5409,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5509,42 +5428,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); enumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection", "TestNamespace") }); var enumU64NestedCollection = runtimeEntityType.AddProperty( "EnumU64NestedCollection", @@ -5552,20 +5470,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance) == null); enumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[81]); enumU64NestedCollection.SetPropertyIndexes( index: 81, originalValueIndex: 81, @@ -5574,17 +5492,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5594,29 +5512,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5625,42 +5543,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))); enumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection", "TestNamespace") }); var enumU8 = runtimeEntityType.AddProperty( "EnumU8", @@ -5668,20 +5585,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[82]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), + object (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( index: 82, originalValueIndex: 82, @@ -5690,28 +5607,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); enumU8.SetSentinelFromProviderValue((byte)0); enumU8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8", "TestNamespace") }); var enumU8Array = runtimeEntityType.AddProperty( "EnumU8Array", @@ -5719,20 +5635,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance) == null); enumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[83]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( index: 83, originalValueIndex: 83, @@ -5741,17 +5657,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5760,38 +5676,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); enumU8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array", "TestNamespace") }); var enumU8AsString = runtimeEntityType.AddProperty( "EnumU8AsString", @@ -5800,20 +5715,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[84]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( index: 84, originalValueIndex: 84, @@ -5822,33 +5737,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); enumU8AsString.SetSentinelFromProviderValue("Min"); enumU8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString", "TestNamespace") }); var enumU8AsStringArray = runtimeEntityType.AddProperty( "EnumU8AsStringArray", @@ -5856,20 +5770,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance) == null); enumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( index: 85, originalValueIndex: 85, @@ -5878,17 +5792,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5897,43 +5811,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); enumU8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray", "TestNamespace") }); var enumU8AsStringCollection = runtimeEntityType.AddProperty( "EnumU8AsStringCollection", @@ -5941,20 +5854,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance) == null); enumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[86]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( index: 86, originalValueIndex: 86, @@ -5963,17 +5876,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5982,43 +5895,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); enumU8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection", "TestNamespace") }); var enumU8Collection = runtimeEntityType.AddProperty( "EnumU8Collection", @@ -6026,20 +5938,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance) == null); enumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[87]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( index: 87, originalValueIndex: 87, @@ -6048,17 +5960,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6067,38 +5979,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); enumU8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection", "TestNamespace") }); var @float = runtimeEntityType.AddProperty( "Float", @@ -6107,20 +6018,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Float>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0f); @float.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity).Equals(0F), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance).Equals(0F)); + float (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity).Equals(0F), + float (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance).Equals(0F)); @float.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), - (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), - (ValueBuffer valueBuffer) => valueBuffer[88]); + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), + float (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), + object (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( index: 88, originalValueIndex: 88, @@ -6129,19 +6040,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @float.TypeMapping = SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)); @float.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @float.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float", "TestNamespace") }); var floatArray = runtimeEntityType.AddProperty( "FloatArray", @@ -6149,20 +6059,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("FloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<FloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); floatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance) == null); + float[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity) == null, + float[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance) == null); floatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), - (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), + float[] (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), + object (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( index: 89, originalValueIndex: 89, @@ -6171,17 +6081,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); floatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), keyComparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6193,19 +6103,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))); floatArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - floatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray", "TestNamespace") }); var guid = runtimeEntityType.AddProperty( "Guid", @@ -6214,20 +6123,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Guid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); guid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), - (ValueBuffer valueBuffer) => valueBuffer[90]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), + object (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( index: 90, originalValueIndex: 90, @@ -6236,21 +6145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guid.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); guid.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid", "TestNamespace") }); var guidArray = runtimeEntityType.AddProperty( "GuidArray", @@ -6258,20 +6166,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance) == null); + Guid[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity) == null, + Guid[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance) == null); guidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[91]); + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), + Guid[] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), + object (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( index: 91, originalValueIndex: 91, @@ -6280,17 +6188,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6302,21 +6210,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))); guidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray", "TestNamespace") }); var guidNestedCollection = runtimeEntityType.AddProperty( "GuidNestedCollection", @@ -6324,20 +6231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance) == null); + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) == null, + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance) == null); guidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[92]); + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[92]); guidNestedCollection.SetPropertyIndexes( index: 92, originalValueIndex: 92, @@ -6346,17 +6253,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6372,17 +6279,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6396,17 +6303,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6418,21 +6325,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))))); guidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection", "TestNamespace") }); var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", @@ -6441,20 +6347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToBytesConverter()); guidToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[93]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( index: 93, originalValueIndex: 93, @@ -6463,31 +6369,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)), + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)))); + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)))); guidToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); guidToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty", "TestNamespace") }); var guidToStringConverterProperty = runtimeEntityType.AddProperty( "GuidToStringConverterProperty", @@ -6496,20 +6401,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToStringConverter()); guidToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[94]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( index: 94, originalValueIndex: 94, @@ -6518,33 +6423,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(36)", size: 36, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)), + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, string>( JsonStringReaderWriter.Instance, new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)))); + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); guidToStringConverterProperty.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); guidToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty", "TestNamespace") }); var iPAddress = runtimeEntityType.AddProperty( "IPAddress", @@ -6552,20 +6456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance) == null); iPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[95]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( index: 95, originalValueIndex: 95, @@ -6574,32 +6478,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); iPAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress", "TestNamespace") }); var iPAddressArray = runtimeEntityType.AddProperty( "IPAddressArray", @@ -6607,20 +6510,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance) == null); iPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[96]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( index: 96, originalValueIndex: 96, @@ -6629,17 +6532,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6648,43 +6551,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); iPAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray", "TestNamespace") }); var iPAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "IPAddressToBytesConverterProperty", @@ -6693,20 +6595,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToBytesConverter()); iPAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance) == null); iPAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[97]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( index: 97, originalValueIndex: 97, @@ -6715,30 +6617,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)), + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)))); + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)))); iPAddressToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty", "TestNamespace") }); var iPAddressToStringConverterProperty = runtimeEntityType.AddProperty( "IPAddressToStringConverterProperty", @@ -6747,20 +6648,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToStringConverter()); iPAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance) == null); iPAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[98]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( index: 98, originalValueIndex: 98, @@ -6769,32 +6670,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); iPAddressToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty", "TestNamespace") }); var int16 = runtimeEntityType.AddProperty( "Int16", @@ -6803,20 +6703,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (short)0); int16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance) == 0); + short (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity) == 0, + short (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance) == 0); int16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), - (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), - (ValueBuffer valueBuffer) => valueBuffer[99]); + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), + short (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), + object (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( index: 99, originalValueIndex: 99, @@ -6825,19 +6725,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)); int16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16", "TestNamespace") }); var int16Array = runtimeEntityType.AddProperty( "Int16Array", @@ -6845,20 +6744,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance) == null); + short[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity) == null, + short[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance) == null); int16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), - (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[100]); + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), + short[] (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), + object (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( index: 100, originalValueIndex: 100, @@ -6867,17 +6766,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6889,19 +6788,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); int16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array", "TestNamespace") }); var int32 = runtimeEntityType.AddProperty( "Int32", @@ -6910,20 +6808,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); int32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance) == 0); int32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), - (ValueBuffer valueBuffer) => valueBuffer[101]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), + object (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( index: 101, originalValueIndex: 101, @@ -6932,19 +6830,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); int32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32", "TestNamespace") }); var int32Array = runtimeEntityType.AddProperty( "Int32Array", @@ -6952,20 +6849,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance) == null); + int[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity) == null, + int[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance) == null); int32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[102]); + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), + int[] (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), + object (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( index: 102, originalValueIndex: 102, @@ -6974,17 +6871,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6996,19 +6893,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))); int32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array", "TestNamespace") }); var int32NestedCollection = runtimeEntityType.AddProperty( "Int32NestedCollection", @@ -7016,20 +6912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance) == null); + int[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) == null, + int[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance) == null); int32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[103]); + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), + int[][] (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[103]); int32NestedCollection.SetPropertyIndexes( index: 103, originalValueIndex: 103, @@ -7038,17 +6934,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7062,17 +6958,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7084,19 +6980,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))); int32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection", "TestNamespace") }); var int64 = runtimeEntityType.AddProperty( "Int64", @@ -7105,20 +7000,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0L); int64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) == 0L, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance) == 0L); + long (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity) == 0L, + long (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance) == 0L); int64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), - (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), - (ValueBuffer valueBuffer) => valueBuffer[104]); + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), + long (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), + object (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( index: 104, originalValueIndex: 104, @@ -7127,19 +7022,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); int64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64", "TestNamespace") }); var int64Array = runtimeEntityType.AddProperty( "Int64Array", @@ -7147,20 +7041,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance) == null); + long[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity) == null, + long[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance) == null); int64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), - (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[105]); + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), + long[] (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), + object (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( index: 105, originalValueIndex: 105, @@ -7169,17 +7063,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7191,19 +7085,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))); int64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array", "TestNamespace") }); var int64NestedCollection = runtimeEntityType.AddProperty( "Int64NestedCollection", @@ -7211,20 +7104,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance) == null); + IList<long[]>[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) == null, + IList<long[]>[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance) == null); int64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[106]); + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), + IList<long[]>[] (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[106]); int64NestedCollection.SetPropertyIndexes( index: 106, originalValueIndex: 106, @@ -7233,17 +7126,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7259,17 +7152,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7283,17 +7176,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7305,19 +7198,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))); int64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection", "TestNamespace") }); var int8 = runtimeEntityType.AddProperty( "Int8", @@ -7325,20 +7217,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance) == 0); + sbyte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity) == 0, + sbyte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance) == 0); int8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), - (ValueBuffer valueBuffer) => valueBuffer[107]); + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), + sbyte (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), + object (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( index: 107, originalValueIndex: 107, @@ -7347,28 +7239,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))); int8.SetSentinelFromProviderValue((short)0); int8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8", "TestNamespace") }); var int8Array = runtimeEntityType.AddProperty( "Int8Array", @@ -7376,20 +7267,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance) == null); + sbyte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity) == null, + sbyte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance) == null); int8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[108]); + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), + sbyte[] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), + object (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( index: 108, originalValueIndex: 108, @@ -7398,17 +7289,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7417,38 +7308,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))); int8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array", "TestNamespace") }); var int8NestedCollection = runtimeEntityType.AddProperty( "Int8NestedCollection", @@ -7456,20 +7346,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance) == null); + sbyte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) == null, + sbyte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance) == null); int8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[109]); + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), + sbyte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[109]); int8NestedCollection.SetPropertyIndexes( index: 109, originalValueIndex: 109, @@ -7478,17 +7368,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7499,8 +7389,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<sbyte[][][], sbyte[][]>( new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( @@ -7508,21 +7398,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7532,29 +7422,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7563,38 +7453,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))))); int8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection", "TestNamespace") }); var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", @@ -7603,20 +7492,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<int>()); intNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance) == 0); intNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[110]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( index: 110, originalValueIndex: 110, @@ -7625,31 +7514,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(4)", size: 4), converter: new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)), + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)))); + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))))); intNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0 }); intNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - intNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty", "TestNamespace") }); var intNumberToStringConverterProperty = runtimeEntityType.AddProperty( "IntNumberToStringConverterProperty", @@ -7658,20 +7546,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<int>()); intNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance) == 0); intNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[111]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( index: 111, originalValueIndex: 111, @@ -7680,33 +7568,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, string>( JsonStringReaderWriter.Instance, new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); intNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); intNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - intNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty", "TestNamespace") }); var nullIntToNullStringConverterProperty = runtimeEntityType.AddProperty( "NullIntToNullStringConverterProperty", @@ -7716,20 +7603,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullable: true, valueConverter: new CompiledModelTestBase.NullIntToNullStringConverter()); nullIntToNullStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance).HasValue)); nullIntToNullStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullIntToNullStringConverterProperty, 112), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[112]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullIntToNullStringConverterProperty, 112), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullIntToNullStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( index: 112, originalValueIndex: 112, @@ -7738,34 +7625,33 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullIntToNullStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), keyComparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int?, string>( JsonStringReaderWriter.Instance, new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true))); nullIntToNullStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullIntToNullStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty", "TestNamespace") }); var nullableBool = runtimeEntityType.AddProperty( "NullableBool", @@ -7774,20 +7660,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance).HasValue); + bool? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableBool(entity).HasValue), + bool? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableBool(instance).HasValue)); nullableBool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>>(nullableBool, 113), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[113]); + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => entry.ReadOriginalValue<bool?>(nullableBool, 113), + bool? (InternalEntityEntry entry) => entry.GetCurrentValue<bool?>(nullableBool), + object (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( index: 113, originalValueIndex: 113, @@ -7796,21 +7682,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBool.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)); nullableBool.SetValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.Comparer)); nullableBool.SetKeyValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.KeyComparer)); nullableBool.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool", "TestNamespace") }); var nullableBoolArray = runtimeEntityType.AddProperty( "NullableBoolArray", @@ -7818,20 +7703,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBoolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance) == null); + bool? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) == null, + bool? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance) == null); nullableBoolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>[]>(nullableBoolArray, 114), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool? []>(nullableBoolArray, 114), + bool? [] (InternalEntityEntry entry) => entry.GetCurrentValue<bool? []>(nullableBoolArray), + object (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( index: 114, originalValueIndex: 114, @@ -7840,17 +7725,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7862,19 +7747,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))); nullableBoolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBoolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray", "TestNamespace") }); var nullableBytes = runtimeEntityType.AddProperty( "NullableBytes", @@ -7883,20 +7767,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance) == null); nullableBytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[115]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), + object (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( index: 115, originalValueIndex: 115, @@ -7905,22 +7789,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytes.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); nullableBytes.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes", "TestNamespace") }); var nullableBytesArray = runtimeEntityType.AddProperty( "NullableBytesArray", @@ -7928,20 +7811,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance) == null); nullableBytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( index: 116, originalValueIndex: 116, @@ -7950,17 +7833,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7972,22 +7855,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); nullableBytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray", "TestNamespace") }); var nullableBytesNestedCollection = runtimeEntityType.AddProperty( "NullableBytesNestedCollection", @@ -7995,20 +7877,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance) == null); nullableBytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[117]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[117]); nullableBytesNestedCollection.SetPropertyIndexes( index: 117, originalValueIndex: 117, @@ -8017,17 +7899,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8041,17 +7923,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8063,22 +7945,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None))); nullableBytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection", "TestNamespace") }); var nullableChar = runtimeEntityType.AddProperty( "NullableChar", @@ -8087,20 +7968,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableChar>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableChar.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance).HasValue); + char? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableChar(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableChar(entity).HasValue), + char? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableChar(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableChar(instance).HasValue)); nullableChar.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>>(nullableChar, 118), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[118]); + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => entry.ReadOriginalValue<char?>(nullableChar, 118), + char? (InternalEntityEntry entry) => entry.GetCurrentValue<char?>(nullableChar), + object (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( index: 118, originalValueIndex: 118, @@ -8109,34 +7990,33 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableChar.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); nullableChar.SetValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.Comparer)); nullableChar.SetKeyValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.KeyComparer)); nullableChar.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableChar.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar", "TestNamespace") }); var nullableCharArray = runtimeEntityType.AddProperty( "NullableCharArray", @@ -8144,20 +8024,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableCharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableCharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableCharArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance) == null); + char? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity) == null, + char? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance) == null); nullableCharArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>[]>(nullableCharArray, 119), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[119]); + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<char? []>(nullableCharArray, 119), + char? [] (InternalEntityEntry entry) => entry.GetCurrentValue<char? []>(nullableCharArray), + object (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( index: 119, originalValueIndex: 119, @@ -8166,17 +8046,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8185,43 +8065,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))); nullableCharArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableCharArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray", "TestNamespace") }); var nullableDateOnly = runtimeEntityType.AddProperty( "NullableDateOnly", @@ -8230,20 +8109,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance).HasValue); + DateOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateOnly(entity).HasValue), + DateOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateOnly(instance).HasValue)); nullableDateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>>(nullableDateOnly, 120), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[120]); + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly?>(nullableDateOnly, 120), + DateOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly?>(nullableDateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( index: 120, originalValueIndex: 120, @@ -8252,21 +8131,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnly.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)); nullableDateOnly.SetValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.Comparer)); nullableDateOnly.SetKeyValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.KeyComparer)); nullableDateOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly", "TestNamespace") }); var nullableDateOnlyArray = runtimeEntityType.AddProperty( "NullableDateOnlyArray", @@ -8274,20 +8152,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance) == null); + DateOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) == null, + DateOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance) == null); nullableDateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>[]>(nullableDateOnlyArray, 121), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[121]); + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly? []>(nullableDateOnlyArray, 121), + DateOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( index: 121, originalValueIndex: 121, @@ -8296,17 +8174,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8318,19 +8196,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))); nullableDateOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray", "TestNamespace") }); var nullableDateTime = runtimeEntityType.AddProperty( "NullableDateTime", @@ -8339,20 +8216,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance).HasValue); + DateTime? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateTime(entity).HasValue), + DateTime? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateTime(instance).HasValue)); nullableDateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>>(nullableDateTime, 122), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[122]); + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime?>(nullableDateTime, 122), + DateTime? (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime?>(nullableDateTime), + object (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( index: 122, originalValueIndex: 122, @@ -8361,21 +8238,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTime.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); nullableDateTime.SetValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.Comparer)); nullableDateTime.SetKeyValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.KeyComparer)); nullableDateTime.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime", "TestNamespace") }); var nullableDateTimeArray = runtimeEntityType.AddProperty( "NullableDateTimeArray", @@ -8383,20 +8259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance) == null); + DateTime? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) == null, + DateTime? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance) == null); nullableDateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>[]>(nullableDateTimeArray, 123), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[123]); + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime? []>(nullableDateTimeArray, 123), + DateTime? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime? []>(nullableDateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( index: 123, originalValueIndex: 123, @@ -8405,17 +8281,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8427,19 +8303,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); nullableDateTimeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray", "TestNamespace") }); var nullableDecimal = runtimeEntityType.AddProperty( "NullableDecimal", @@ -8448,20 +8323,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDecimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance).HasValue); + decimal? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDecimal(entity).HasValue), + decimal? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDecimal(instance).HasValue)); nullableDecimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>>(nullableDecimal, 124), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[124]); + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal?>(nullableDecimal, 124), + decimal? (InternalEntityEntry entry) => entry.GetCurrentValue<decimal?>(nullableDecimal), + object (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( index: 124, originalValueIndex: 124, @@ -8470,21 +8345,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimal.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)); nullableDecimal.SetValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.Comparer)); nullableDecimal.SetKeyValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.KeyComparer)); nullableDecimal.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDecimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal", "TestNamespace") }); var nullableDecimalArray = runtimeEntityType.AddProperty( "NullableDecimalArray", @@ -8492,20 +8366,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDecimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance) == null); + decimal? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) == null, + decimal? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance) == null); nullableDecimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>[]>(nullableDecimalArray, 125), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[125]); + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal? []>(nullableDecimalArray, 125), + decimal? [] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal? []>(nullableDecimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( index: 125, originalValueIndex: 125, @@ -8514,17 +8388,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), keyComparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8536,19 +8410,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))); nullableDecimalArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDecimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray", "TestNamespace") }); var nullableDouble = runtimeEntityType.AddProperty( "NullableDouble", @@ -8557,20 +8430,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDouble>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDouble.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance).HasValue); + double? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDouble(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDouble(entity).HasValue), + double? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDouble(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDouble(instance).HasValue)); nullableDouble.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>>(nullableDouble, 126), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[126]); + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => entry.ReadOriginalValue<double?>(nullableDouble, 126), + double? (InternalEntityEntry entry) => entry.GetCurrentValue<double?>(nullableDouble), + object (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( index: 126, originalValueIndex: 126, @@ -8579,21 +8452,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDouble.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)); nullableDouble.SetValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.Comparer)); nullableDouble.SetKeyValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.KeyComparer)); nullableDouble.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDouble.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble", "TestNamespace") }); var nullableDoubleArray = runtimeEntityType.AddProperty( "NullableDoubleArray", @@ -8601,20 +8473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDoubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance) == null); + double? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) == null, + double? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance) == null); nullableDoubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>[]>(nullableDoubleArray, 127), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[127]); + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<double? []>(nullableDoubleArray, 127), + double? [] (InternalEntityEntry entry) => entry.GetCurrentValue<double? []>(nullableDoubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( index: 127, originalValueIndex: 127, @@ -8623,17 +8495,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), keyComparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8645,19 +8517,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))); nullableDoubleArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDoubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray", "TestNamespace") }); var nullableEnum16 = runtimeEntityType.AddProperty( "NullableEnum16", @@ -8666,20 +8537,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16(instance).HasValue)); nullableEnum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16, 128), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[128]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16, 128), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16), + object (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( index: 128, originalValueIndex: 128, @@ -8688,29 +8559,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.Comparer)); nullableEnum16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.KeyComparer)); nullableEnum16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16", "TestNamespace") }); var nullableEnum16Array = runtimeEntityType.AddProperty( "NullableEnum16Array", @@ -8718,20 +8588,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance) == null); nullableEnum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array, 129), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[129]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array, 129), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( index: 129, originalValueIndex: 129, @@ -8740,17 +8610,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8759,38 +8629,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array", "TestNamespace") }); var nullableEnum16AsString = runtimeEntityType.AddProperty( "NullableEnum16AsString", @@ -8799,20 +8668,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(instance).HasValue)); nullableEnum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString, 130), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[130]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString, 130), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( index: 130, originalValueIndex: 130, @@ -8821,29 +8690,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsString.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.Comparer)); nullableEnum16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.KeyComparer)); nullableEnum16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString", "TestNamespace") }); var nullableEnum16AsStringArray = runtimeEntityType.AddProperty( "NullableEnum16AsStringArray", @@ -8851,20 +8719,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance) == null); nullableEnum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray, 131), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[131]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray, 131), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( index: 131, originalValueIndex: 131, @@ -8873,17 +8741,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8892,38 +8760,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray", "TestNamespace") }); var nullableEnum16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum16AsStringCollection", @@ -8931,20 +8798,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance) == null); nullableEnum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection, 132), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[132]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection, 132), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( index: 132, originalValueIndex: 132, @@ -8953,17 +8820,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8972,38 +8839,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection", "TestNamespace") }); var nullableEnum16Collection = runtimeEntityType.AddProperty( "NullableEnum16Collection", @@ -9011,20 +8877,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance) == null); nullableEnum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection, 133), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection, 133), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( index: 133, originalValueIndex: 133, @@ -9033,17 +8899,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9052,38 +8918,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection", "TestNamespace") }); var nullableEnum32 = runtimeEntityType.AddProperty( "NullableEnum32", @@ -9092,20 +8957,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32(instance).HasValue)); nullableEnum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32, 134), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[134]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32, 134), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32), + object (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( index: 134, originalValueIndex: 134, @@ -9114,29 +8979,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.Comparer)); nullableEnum32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.KeyComparer)); nullableEnum32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32", "TestNamespace") }); var nullableEnum32Array = runtimeEntityType.AddProperty( "NullableEnum32Array", @@ -9144,20 +9008,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance) == null); nullableEnum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array, 135), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[135]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array, 135), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( index: 135, originalValueIndex: 135, @@ -9166,17 +9030,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9185,38 +9049,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array", "TestNamespace") }); var nullableEnum32AsString = runtimeEntityType.AddProperty( "NullableEnum32AsString", @@ -9225,20 +9088,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(instance).HasValue)); nullableEnum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString, 136), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[136]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString, 136), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( index: 136, originalValueIndex: 136, @@ -9247,29 +9110,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.Comparer)); nullableEnum32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.KeyComparer)); nullableEnum32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString", "TestNamespace") }); var nullableEnum32AsStringArray = runtimeEntityType.AddProperty( "NullableEnum32AsStringArray", @@ -9277,20 +9139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance) == null); nullableEnum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray, 137), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[137]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray, 137), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( index: 137, originalValueIndex: 137, @@ -9299,17 +9161,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9318,38 +9180,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray", "TestNamespace") }); var nullableEnum32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum32AsStringCollection", @@ -9357,20 +9218,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance) == null); nullableEnum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection, 138), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[138]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection, 138), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( index: 138, originalValueIndex: 138, @@ -9379,17 +9240,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9398,38 +9259,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection", "TestNamespace") }); var nullableEnum32Collection = runtimeEntityType.AddProperty( "NullableEnum32Collection", @@ -9437,20 +9297,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance) == null); nullableEnum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection, 139), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection, 139), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( index: 139, originalValueIndex: 139, @@ -9459,17 +9319,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9478,38 +9338,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection", "TestNamespace") }); var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( "NullableEnum32NestedCollection", @@ -9517,20 +9376,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance) == null); + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) == null, + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance) == null); nullableEnum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection, 140), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection, 140), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[140]); nullableEnum32NestedCollection.SetPropertyIndexes( index: 140, originalValueIndex: 140, @@ -9539,17 +9398,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9560,8 +9419,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( @@ -9569,21 +9428,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9593,29 +9452,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9624,38 +9483,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); nullableEnum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection", "TestNamespace") }); var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", @@ -9664,20 +9522,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64(instance).HasValue)); nullableEnum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64, 141), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[141]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64, 141), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64), + object (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( index: 141, originalValueIndex: 141, @@ -9686,29 +9544,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.Comparer)); nullableEnum64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.KeyComparer)); nullableEnum64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64", "TestNamespace") }); var nullableEnum64Array = runtimeEntityType.AddProperty( "NullableEnum64Array", @@ -9716,20 +9573,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance) == null); nullableEnum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array, 142), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array, 142), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( index: 142, originalValueIndex: 142, @@ -9738,17 +9595,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9757,38 +9614,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array", "TestNamespace") }); var nullableEnum64AsString = runtimeEntityType.AddProperty( "NullableEnum64AsString", @@ -9797,20 +9653,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(instance).HasValue)); nullableEnum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString, 143), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString, 143), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( index: 143, originalValueIndex: 143, @@ -9819,29 +9675,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsString.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.Comparer)); nullableEnum64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.KeyComparer)); nullableEnum64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString", "TestNamespace") }); var nullableEnum64AsStringArray = runtimeEntityType.AddProperty( "NullableEnum64AsStringArray", @@ -9849,20 +9704,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance) == null); nullableEnum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray, 144), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray, 144), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( index: 144, originalValueIndex: 144, @@ -9871,17 +9726,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9890,38 +9745,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray", "TestNamespace") }); var nullableEnum64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum64AsStringCollection", @@ -9929,20 +9783,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance) == null); nullableEnum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection, 145), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection, 145), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( index: 145, originalValueIndex: 145, @@ -9951,17 +9805,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9970,38 +9824,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection", "TestNamespace") }); var nullableEnum64Collection = runtimeEntityType.AddProperty( "NullableEnum64Collection", @@ -10009,20 +9862,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance) == null); nullableEnum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection, 146), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection, 146), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( index: 146, originalValueIndex: 146, @@ -10031,17 +9884,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10050,38 +9903,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection", "TestNamespace") }); var nullableEnum8 = runtimeEntityType.AddProperty( "NullableEnum8", @@ -10090,20 +9942,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8(instance).HasValue)); nullableEnum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8, 147), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[147]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8, 147), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8), + object (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( index: 147, originalValueIndex: 147, @@ -10112,29 +9964,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.Comparer)); nullableEnum8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.KeyComparer)); nullableEnum8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8", "TestNamespace") }); var nullableEnum8Array = runtimeEntityType.AddProperty( "NullableEnum8Array", @@ -10142,20 +9993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance) == null); nullableEnum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array, 148), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array, 148), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( index: 148, originalValueIndex: 148, @@ -10164,17 +10015,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10183,38 +10034,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array", "TestNamespace") }); var nullableEnum8AsString = runtimeEntityType.AddProperty( "NullableEnum8AsString", @@ -10223,20 +10073,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(instance).HasValue)); nullableEnum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString, 149), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString, 149), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( index: 149, originalValueIndex: 149, @@ -10245,29 +10095,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsString.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.Comparer)); nullableEnum8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.KeyComparer)); nullableEnum8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString", "TestNamespace") }); var nullableEnum8AsStringArray = runtimeEntityType.AddProperty( "NullableEnum8AsStringArray", @@ -10275,20 +10124,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance) == null); nullableEnum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray, 150), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray, 150), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( index: 150, originalValueIndex: 150, @@ -10297,17 +10146,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10316,38 +10165,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray", "TestNamespace") }); var nullableEnum8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum8AsStringCollection", @@ -10355,20 +10203,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance) == null); nullableEnum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection, 151), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection, 151), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( index: 151, originalValueIndex: 151, @@ -10377,17 +10225,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10396,38 +10244,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection", "TestNamespace") }); var nullableEnum8Collection = runtimeEntityType.AddProperty( "NullableEnum8Collection", @@ -10435,20 +10282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance) == null); nullableEnum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection, 152), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection, 152), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( index: 152, originalValueIndex: 152, @@ -10457,17 +10304,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10476,38 +10323,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection", "TestNamespace") }); var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( "NullableEnum8NestedCollection", @@ -10515,20 +10361,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance) == null); nullableEnum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection, 153), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[153]); + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection, 153), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[153]); nullableEnum8NestedCollection.SetPropertyIndexes( index: 153, originalValueIndex: 153, @@ -10537,17 +10383,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10557,29 +10403,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10588,38 +10434,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))); nullableEnum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection", "TestNamespace") }); var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", @@ -10628,20 +10473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16(instance).HasValue)); nullableEnumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16, 154), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[154]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16, 154), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16), + object (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( index: 154, originalValueIndex: 154, @@ -10650,29 +10495,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.Comparer)); nullableEnumU16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.KeyComparer)); nullableEnumU16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16", "TestNamespace") }); var nullableEnumU16Array = runtimeEntityType.AddProperty( "NullableEnumU16Array", @@ -10680,20 +10524,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance) == null); nullableEnumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array, 155), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[155]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array, 155), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( index: 155, originalValueIndex: 155, @@ -10702,17 +10546,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10721,38 +10565,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array", "TestNamespace") }); var nullableEnumU16AsString = runtimeEntityType.AddProperty( "NullableEnumU16AsString", @@ -10761,20 +10604,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance).HasValue)); nullableEnumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString, 156), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[156]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString, 156), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( index: 156, originalValueIndex: 156, @@ -10783,29 +10626,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.Comparer)); nullableEnumU16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.KeyComparer)); nullableEnumU16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString", "TestNamespace") }); var nullableEnumU16AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU16AsStringArray", @@ -10813,20 +10655,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance) == null); nullableEnumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray, 157), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[157]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray, 157), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( index: 157, originalValueIndex: 157, @@ -10835,17 +10677,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10854,38 +10696,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray", "TestNamespace") }); var nullableEnumU16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU16AsStringCollection", @@ -10893,20 +10734,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance) == null); nullableEnumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection, 158), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection, 158), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( index: 158, originalValueIndex: 158, @@ -10915,17 +10756,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10934,38 +10775,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection", "TestNamespace") }); var nullableEnumU16Collection = runtimeEntityType.AddProperty( "NullableEnumU16Collection", @@ -10973,20 +10813,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance) == null); nullableEnumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection, 159), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[159]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection, 159), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( index: 159, originalValueIndex: 159, @@ -10995,17 +10835,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11014,38 +10854,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection", "TestNamespace") }); var nullableEnumU32 = runtimeEntityType.AddProperty( "NullableEnumU32", @@ -11054,20 +10893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32(instance).HasValue)); nullableEnumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32, 160), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[160]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32, 160), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32), + object (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( index: 160, originalValueIndex: 160, @@ -11076,29 +10915,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.Comparer)); nullableEnumU32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.KeyComparer)); nullableEnumU32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32", "TestNamespace") }); var nullableEnumU32Array = runtimeEntityType.AddProperty( "NullableEnumU32Array", @@ -11106,20 +10944,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance) == null); nullableEnumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array, 161), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[161]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array, 161), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( index: 161, originalValueIndex: 161, @@ -11128,17 +10966,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11147,38 +10985,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array", "TestNamespace") }); var nullableEnumU32AsString = runtimeEntityType.AddProperty( "NullableEnumU32AsString", @@ -11187,20 +11024,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance).HasValue)); nullableEnumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString, 162), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[162]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString, 162), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( index: 162, originalValueIndex: 162, @@ -11209,29 +11046,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsString.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.Comparer)); nullableEnumU32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.KeyComparer)); nullableEnumU32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString", "TestNamespace") }); var nullableEnumU32AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU32AsStringArray", @@ -11239,20 +11075,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance) == null); nullableEnumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray, 163), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[163]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray, 163), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( index: 163, originalValueIndex: 163, @@ -11261,17 +11097,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11280,38 +11116,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray", "TestNamespace") }); var nullableEnumU32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU32AsStringCollection", @@ -11319,20 +11154,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance) == null); nullableEnumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection, 164), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection, 164), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( index: 164, originalValueIndex: 164, @@ -11341,17 +11176,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11360,38 +11195,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection", "TestNamespace") }); var nullableEnumU32Collection = runtimeEntityType.AddProperty( "NullableEnumU32Collection", @@ -11399,20 +11233,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance) == null); nullableEnumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection, 165), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[165]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection, 165), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( index: 165, originalValueIndex: 165, @@ -11421,17 +11255,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11440,38 +11274,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection", "TestNamespace") }); var nullableEnumU64 = runtimeEntityType.AddProperty( "NullableEnumU64", @@ -11480,20 +11313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64(instance).HasValue)); nullableEnumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64, 166), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[166]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64, 166), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64), + object (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( index: 166, originalValueIndex: 166, @@ -11502,33 +11335,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); nullableEnumU64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.Comparer)); nullableEnumU64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.KeyComparer)); nullableEnumU64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64", "TestNamespace") }); var nullableEnumU64Array = runtimeEntityType.AddProperty( "NullableEnumU64Array", @@ -11536,20 +11368,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance) == null); nullableEnumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array, 167), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[167]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array, 167), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( index: 167, originalValueIndex: 167, @@ -11558,17 +11390,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11577,42 +11409,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array", "TestNamespace") }); var nullableEnumU64AsString = runtimeEntityType.AddProperty( "NullableEnumU64AsString", @@ -11621,20 +11452,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance).HasValue)); nullableEnumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString, 168), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[168]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString, 168), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( index: 168, originalValueIndex: 168, @@ -11643,33 +11474,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsString.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); nullableEnumU64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.Comparer)); nullableEnumU64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.KeyComparer)); nullableEnumU64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString", "TestNamespace") }); var nullableEnumU64AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU64AsStringArray", @@ -11677,20 +11507,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance) == null); nullableEnumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray, 169), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[169]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray, 169), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( index: 169, originalValueIndex: 169, @@ -11699,17 +11529,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11718,42 +11548,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray", "TestNamespace") }); var nullableEnumU64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU64AsStringCollection", @@ -11761,20 +11590,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance) == null); nullableEnumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection, 170), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[170]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection, 170), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( index: 170, originalValueIndex: 170, @@ -11783,17 +11612,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11802,42 +11631,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection", "TestNamespace") }); var nullableEnumU64Collection = runtimeEntityType.AddProperty( "NullableEnumU64Collection", @@ -11845,20 +11673,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance) == null); nullableEnumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection, 171), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[171]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection, 171), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( index: 171, originalValueIndex: 171, @@ -11867,17 +11695,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11886,42 +11714,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection", "TestNamespace") }); var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( "NullableEnumU64NestedCollection", @@ -11929,20 +11756,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance) == null); nullableEnumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection, 172), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[172]); + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection, 172), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[172]); nullableEnumU64NestedCollection.SetPropertyIndexes( index: 172, originalValueIndex: 172, @@ -11951,17 +11778,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11971,29 +11798,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12002,42 +11829,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))); nullableEnumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection", "TestNamespace") }); var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", @@ -12046,20 +11872,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8(instance).HasValue)); nullableEnumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8, 173), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[173]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8, 173), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8), + object (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( index: 173, originalValueIndex: 173, @@ -12068,29 +11894,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.Comparer)); nullableEnumU8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.KeyComparer)); nullableEnumU8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8", "TestNamespace") }); var nullableEnumU8Array = runtimeEntityType.AddProperty( "NullableEnumU8Array", @@ -12098,20 +11923,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance) == null); nullableEnumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array, 174), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array, 174), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( index: 174, originalValueIndex: 174, @@ -12120,17 +11945,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12139,38 +11964,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array", "TestNamespace") }); var nullableEnumU8AsString = runtimeEntityType.AddProperty( "NullableEnumU8AsString", @@ -12179,20 +12003,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance).HasValue)); nullableEnumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString, 175), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[175]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString, 175), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( index: 175, originalValueIndex: 175, @@ -12201,29 +12025,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsString.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.Comparer)); nullableEnumU8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.KeyComparer)); nullableEnumU8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString", "TestNamespace") }); var nullableEnumU8AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU8AsStringArray", @@ -12231,20 +12054,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance) == null); nullableEnumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray, 176), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[176]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray, 176), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( index: 176, originalValueIndex: 176, @@ -12253,17 +12076,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12272,38 +12095,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray", "TestNamespace") }); var nullableEnumU8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU8AsStringCollection", @@ -12311,20 +12133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance) == null); nullableEnumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection, 177), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[177]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection, 177), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( index: 177, originalValueIndex: 177, @@ -12333,17 +12155,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12352,38 +12174,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection", "TestNamespace") }); var nullableEnumU8Collection = runtimeEntityType.AddProperty( "NullableEnumU8Collection", @@ -12391,20 +12212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance) == null); nullableEnumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection, 178), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[178]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection, 178), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( index: 178, originalValueIndex: 178, @@ -12413,17 +12234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12432,38 +12253,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection", "TestNamespace") }); var nullableFloat = runtimeEntityType.AddProperty( "NullableFloat", @@ -12472,20 +12292,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloat>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableFloat.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance).HasValue); + float? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloat(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableFloat(entity).HasValue), + float? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloat(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableFloat(instance).HasValue)); nullableFloat.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>>(nullableFloat, 179), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[179]); + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => entry.ReadOriginalValue<float?>(nullableFloat, 179), + float? (InternalEntityEntry entry) => entry.GetCurrentValue<float?>(nullableFloat), + object (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( index: 179, originalValueIndex: 179, @@ -12494,21 +12314,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloat.TypeMapping = SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)); nullableFloat.SetValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.Comparer)); nullableFloat.SetKeyValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.KeyComparer)); nullableFloat.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableFloat.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat", "TestNamespace") }); var nullableFloatArray = runtimeEntityType.AddProperty( "NullableFloatArray", @@ -12516,20 +12335,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableFloatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance) == null); + float? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) == null, + float? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance) == null); nullableFloatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>[]>(nullableFloatArray, 180), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<float? []>(nullableFloatArray, 180), + float? [] (InternalEntityEntry entry) => entry.GetCurrentValue<float? []>(nullableFloatArray), + object (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( index: 180, originalValueIndex: 180, @@ -12538,17 +12357,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), keyComparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12560,19 +12379,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))); nullableFloatArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableFloatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray", "TestNamespace") }); var nullableGuid = runtimeEntityType.AddProperty( "NullableGuid", @@ -12581,20 +12399,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableGuid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance).HasValue); + Guid? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableGuid(entity).HasValue), + Guid? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableGuid(instance).HasValue)); nullableGuid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>>(nullableGuid, 181), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[181]); + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid?>(nullableGuid, 181), + Guid? (InternalEntityEntry entry) => entry.GetCurrentValue<Guid?>(nullableGuid), + object (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( index: 181, originalValueIndex: 181, @@ -12603,23 +12421,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuid.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); nullableGuid.SetValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.Comparer)); nullableGuid.SetKeyValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.KeyComparer)); nullableGuid.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid", "TestNamespace") }); var nullableGuidArray = runtimeEntityType.AddProperty( "NullableGuidArray", @@ -12627,20 +12444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance) == null); + Guid? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) == null, + Guid? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance) == null); nullableGuidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[]>(nullableGuidArray, 182), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? []>(nullableGuidArray, 182), + Guid? [] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? []>(nullableGuidArray), + object (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( index: 182, originalValueIndex: 182, @@ -12649,17 +12466,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12671,21 +12488,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))); nullableGuidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray", "TestNamespace") }); var nullableGuidNestedCollection = runtimeEntityType.AddProperty( "NullableGuidNestedCollection", @@ -12693,20 +12509,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance) == null); + Guid? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) == null, + Guid? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance) == null); nullableGuidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[][]>(nullableGuidNestedCollection, 183), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[183]); + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? [][]>(nullableGuidNestedCollection, 183), + Guid? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[183]); nullableGuidNestedCollection.SetPropertyIndexes( index: 183, originalValueIndex: 183, @@ -12715,17 +12531,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12739,17 +12555,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12761,21 +12577,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")))); nullableGuidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection", "TestNamespace") }); var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", @@ -12784,20 +12599,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableIPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance) == null); nullableIPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[184]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( index: 184, originalValueIndex: 184, @@ -12806,32 +12621,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); nullableIPAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableIPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress", "TestNamespace") }); var nullableIPAddressArray = runtimeEntityType.AddProperty( "NullableIPAddressArray", @@ -12839,20 +12653,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableIPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance) == null); nullableIPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[185]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( index: 185, originalValueIndex: 185, @@ -12861,17 +12675,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12880,43 +12694,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); nullableIPAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableIPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray", "TestNamespace") }); var nullableInt16 = runtimeEntityType.AddProperty( "NullableInt16", @@ -12925,20 +12738,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance).HasValue); + short? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt16(entity).HasValue), + short? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt16(instance).HasValue)); nullableInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>>(nullableInt16, 186), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[186]); + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => entry.ReadOriginalValue<short?>(nullableInt16, 186), + short? (InternalEntityEntry entry) => entry.GetCurrentValue<short?>(nullableInt16), + object (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( index: 186, originalValueIndex: 186, @@ -12947,21 +12760,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)); nullableInt16.SetValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.Comparer)); nullableInt16.SetKeyValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.KeyComparer)); nullableInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16", "TestNamespace") }); var nullableInt16Array = runtimeEntityType.AddProperty( "NullableInt16Array", @@ -12969,20 +12781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance) == null); + short? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) == null, + short? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance) == null); nullableInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>[]>(nullableInt16Array, 187), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[187]); + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<short? []>(nullableInt16Array, 187), + short? [] (InternalEntityEntry entry) => entry.GetCurrentValue<short? []>(nullableInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( index: 187, originalValueIndex: 187, @@ -12991,17 +12803,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), keyComparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13013,19 +12825,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); nullableInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array", "TestNamespace") }); var nullableInt32 = runtimeEntityType.AddProperty( "NullableInt32", @@ -13034,20 +12845,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt32(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt32(instance).HasValue)); nullableInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullableInt32, 188), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[188]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullableInt32, 188), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullableInt32), + object (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( index: 188, originalValueIndex: 188, @@ -13056,21 +12867,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); nullableInt32.SetValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.Comparer)); nullableInt32.SetKeyValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.KeyComparer)); nullableInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32", "TestNamespace") }); var nullableInt32Array = runtimeEntityType.AddProperty( "NullableInt32Array", @@ -13078,20 +12888,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance) == null); + int? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) == null, + int? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance) == null); nullableInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[]>(nullableInt32Array, 189), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[189]); + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? []>(nullableInt32Array, 189), + int? [] (InternalEntityEntry entry) => entry.GetCurrentValue<int? []>(nullableInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( index: 189, originalValueIndex: 189, @@ -13100,17 +12910,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13122,19 +12932,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))); nullableInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array", "TestNamespace") }); var nullableInt32NestedCollection = runtimeEntityType.AddProperty( "NullableInt32NestedCollection", @@ -13142,20 +12951,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance) == null); + int? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) == null, + int? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance) == null); nullableInt32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[][]>(nullableInt32NestedCollection, 190), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[190]); + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? [][]>(nullableInt32NestedCollection, 190), + int? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<int? [][]>(nullableInt32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[190]); nullableInt32NestedCollection.SetPropertyIndexes( index: 190, originalValueIndex: 190, @@ -13164,17 +12973,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), keyComparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13188,17 +12997,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13210,19 +13019,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))); nullableInt32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection", "TestNamespace") }); var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", @@ -13231,20 +13039,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance).HasValue); + long? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt64(entity).HasValue), + long? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt64(instance).HasValue)); nullableInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(nullableInt64, 191), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(nullableInt64, 191), + long? (InternalEntityEntry entry) => entry.GetCurrentValue<long?>(nullableInt64), + object (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( index: 191, originalValueIndex: 191, @@ -13253,21 +13061,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); nullableInt64.SetValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.Comparer)); nullableInt64.SetKeyValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.KeyComparer)); nullableInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64", "TestNamespace") }); var nullableInt64Array = runtimeEntityType.AddProperty( "NullableInt64Array", @@ -13275,20 +13082,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance) == null); + long? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) == null, + long? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance) == null); nullableInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>[]>(nullableInt64Array, 192), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<long? []>(nullableInt64Array, 192), + long? [] (InternalEntityEntry entry) => entry.GetCurrentValue<long? []>(nullableInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( index: 192, originalValueIndex: 192, @@ -13297,17 +13104,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13319,19 +13126,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))); nullableInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array", "TestNamespace") }); var nullableInt64NestedCollection = runtimeEntityType.AddProperty( "NullableInt64NestedCollection", @@ -13339,20 +13145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance) == null); + List<long? [][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) == null, + List<long? [][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance) == null); nullableInt64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection, 193), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[193]); + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<long? [][]>>(nullableInt64NestedCollection, 193), + List<long? [][]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[193]); nullableInt64NestedCollection.SetPropertyIndexes( index: 193, originalValueIndex: 193, @@ -13361,17 +13167,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), keyComparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13387,17 +13193,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13411,17 +13217,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13433,19 +13239,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))); nullableInt64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection", "TestNamespace") }); var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", @@ -13454,20 +13259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance).HasValue); + sbyte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt8(entity).HasValue), + sbyte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt8(instance).HasValue)); nullableInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>>(nullableInt8, 194), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[194]); + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte?>(nullableInt8, 194), + sbyte? (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte?>(nullableInt8), + object (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( index: 194, originalValueIndex: 194, @@ -13476,29 +13281,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))); nullableInt8.SetValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.Comparer)); nullableInt8.SetKeyValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.KeyComparer)); nullableInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8", "TestNamespace") }); var nullableInt8Array = runtimeEntityType.AddProperty( "NullableInt8Array", @@ -13506,20 +13310,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance) == null); + sbyte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) == null, + sbyte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance) == null); nullableInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>[]>(nullableInt8Array, 195), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[195]); + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte? []>(nullableInt8Array, 195), + sbyte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte? []>(nullableInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( index: 195, originalValueIndex: 195, @@ -13528,17 +13332,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13547,38 +13351,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))); nullableInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array", "TestNamespace") }); var nullablePhysicalAddress = runtimeEntityType.AddProperty( "NullablePhysicalAddress", @@ -13587,20 +13390,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullablePhysicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance) == null); nullablePhysicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[196]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( index: 196, originalValueIndex: 196, @@ -13609,32 +13412,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); nullablePhysicalAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress", "TestNamespace") }); var nullablePhysicalAddressArray = runtimeEntityType.AddProperty( "NullablePhysicalAddressArray", @@ -13642,20 +13444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance) == null); nullablePhysicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[197]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( index: 197, originalValueIndex: 197, @@ -13664,17 +13466,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13683,43 +13485,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray", "TestNamespace") }); var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( "NullablePhysicalAddressNestedCollection", @@ -13727,20 +13528,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance) == null); + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) == null, + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance) == null); nullablePhysicalAddressNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[198]); + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[198]); nullablePhysicalAddressNestedCollection.SetPropertyIndexes( index: 198, originalValueIndex: 198, @@ -13749,17 +13550,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13770,8 +13571,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( @@ -13779,21 +13580,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13803,29 +13604,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13834,43 +13635,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))); nullablePhysicalAddressNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddressNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection", "TestNamespace") }); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -13879,20 +13679,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance) == null); nullableString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[199]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), + object (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( index: 199, originalValueIndex: 199, @@ -13901,24 +13701,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); nullableString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString", "TestNamespace") }); var nullableStringArray = runtimeEntityType.AddProperty( "NullableStringArray", @@ -13926,20 +13725,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance) == null); nullableStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[200]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( index: 200, originalValueIndex: 200, @@ -13948,17 +13747,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13970,24 +13769,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); nullableStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray", "TestNamespace") }); var nullableStringNestedCollection = runtimeEntityType.AddProperty( "NullableStringNestedCollection", @@ -13995,20 +13793,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance) == null); nullableStringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[201]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[201]); nullableStringNestedCollection.SetPropertyIndexes( index: 201, originalValueIndex: 201, @@ -14017,17 +13815,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14041,17 +13839,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14063,24 +13861,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - nullableStringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection", "TestNamespace") }); var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", @@ -14089,20 +13886,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance).HasValue); + TimeOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(entity).HasValue), + TimeOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(instance).HasValue)); nullableTimeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>>(nullableTimeOnly, 202), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[202]); + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly?>(nullableTimeOnly, 202), + TimeOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly?>(nullableTimeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( index: 202, originalValueIndex: 202, @@ -14111,21 +13908,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnly.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)); nullableTimeOnly.SetValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.Comparer)); nullableTimeOnly.SetKeyValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.KeyComparer)); nullableTimeOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly", "TestNamespace") }); var nullableTimeOnlyArray = runtimeEntityType.AddProperty( "NullableTimeOnlyArray", @@ -14133,20 +13929,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance) == null); + TimeOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) == null, + TimeOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance) == null); nullableTimeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray, 203), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[203]); + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly? []>(nullableTimeOnlyArray, 203), + TimeOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( index: 203, originalValueIndex: 203, @@ -14155,17 +13951,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14177,19 +13973,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))); nullableTimeOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray", "TestNamespace") }); var nullableTimeSpan = runtimeEntityType.AddProperty( "NullableTimeSpan", @@ -14198,20 +13993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance).HasValue); + TimeSpan? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(entity).HasValue), + TimeSpan? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(instance).HasValue)); nullableTimeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>>(nullableTimeSpan, 204), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[204]); + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan?>(nullableTimeSpan, 204), + TimeSpan? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan?>(nullableTimeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( index: 204, originalValueIndex: 204, @@ -14220,21 +14015,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpan.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)); nullableTimeSpan.SetValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.Comparer)); nullableTimeSpan.SetKeyValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.KeyComparer)); nullableTimeSpan.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan", "TestNamespace") }); var nullableTimeSpanArray = runtimeEntityType.AddProperty( "NullableTimeSpanArray", @@ -14242,20 +14036,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance) == null); + TimeSpan? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) == null, + TimeSpan? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance) == null); nullableTimeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray, 205), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[205]); + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan? []>(nullableTimeSpanArray, 205), + TimeSpan? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( index: 205, originalValueIndex: 205, @@ -14264,17 +14058,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14286,19 +14080,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))); nullableTimeSpanArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray", "TestNamespace") }); var nullableUInt16 = runtimeEntityType.AddProperty( "NullableUInt16", @@ -14307,20 +14100,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance).HasValue); + ushort? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt16(entity).HasValue), + ushort? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt16(instance).HasValue)); nullableUInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>>(nullableUInt16, 206), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[206]); + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort?>(nullableUInt16, 206), + ushort? (InternalEntityEntry entry) => entry.GetCurrentValue<ushort?>(nullableUInt16), + object (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( index: 206, originalValueIndex: 206, @@ -14329,29 +14122,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))); nullableUInt16.SetValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.Comparer)); nullableUInt16.SetKeyValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.KeyComparer)); nullableUInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16", "TestNamespace") }); var nullableUInt16Array = runtimeEntityType.AddProperty( "NullableUInt16Array", @@ -14359,20 +14151,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance) == null); + ushort? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) == null, + ushort? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance) == null); nullableUInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>[]>(nullableUInt16Array, 207), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[207]); + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort? []>(nullableUInt16Array, 207), + ushort? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort? []>(nullableUInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( index: 207, originalValueIndex: 207, @@ -14381,17 +14173,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14400,38 +14192,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))); nullableUInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array", "TestNamespace") }); var nullableUInt32 = runtimeEntityType.AddProperty( "NullableUInt32", @@ -14440,20 +14231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance).HasValue); + uint? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt32(entity).HasValue), + uint? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt32(instance).HasValue)); nullableUInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>>(nullableUInt32, 208), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[208]); + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => entry.ReadOriginalValue<uint?>(nullableUInt32, 208), + uint? (InternalEntityEntry entry) => entry.GetCurrentValue<uint?>(nullableUInt32), + object (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( index: 208, originalValueIndex: 208, @@ -14462,29 +14253,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))); nullableUInt32.SetValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.Comparer)); nullableUInt32.SetKeyValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.KeyComparer)); nullableUInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32", "TestNamespace") }); var nullableUInt32Array = runtimeEntityType.AddProperty( "NullableUInt32Array", @@ -14492,20 +14282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance) == null); + uint? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) == null, + uint? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance) == null); nullableUInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>[]>(nullableUInt32Array, 209), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[209]); + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint? []>(nullableUInt32Array, 209), + uint? [] (InternalEntityEntry entry) => entry.GetCurrentValue<uint? []>(nullableUInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( index: 209, originalValueIndex: 209, @@ -14514,17 +14304,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), keyComparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14533,38 +14323,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))); nullableUInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array", "TestNamespace") }); var nullableUInt64 = runtimeEntityType.AddProperty( "NullableUInt64", @@ -14573,20 +14362,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance).HasValue); + ulong? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt64(entity).HasValue), + ulong? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt64(instance).HasValue)); nullableUInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>>(nullableUInt64, 210), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[210]); + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong?>(nullableUInt64, 210), + ulong? (InternalEntityEntry entry) => entry.GetCurrentValue<ulong?>(nullableUInt64), + object (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( index: 210, originalValueIndex: 210, @@ -14595,33 +14384,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))); nullableUInt64.SetValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.Comparer)); nullableUInt64.SetKeyValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.KeyComparer)); nullableUInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64", "TestNamespace") }); var nullableUInt64Array = runtimeEntityType.AddProperty( "NullableUInt64Array", @@ -14629,20 +14417,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance) == null); + ulong? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) == null, + ulong? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance) == null); nullableUInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>[]>(nullableUInt64Array, 211), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[211]); + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong? []>(nullableUInt64Array, 211), + ulong? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong? []>(nullableUInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( index: 211, originalValueIndex: 211, @@ -14651,17 +14439,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14670,42 +14458,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))); nullableUInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array", "TestNamespace") }); var nullableUInt8 = runtimeEntityType.AddProperty( "NullableUInt8", @@ -14714,20 +14501,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance).HasValue); + byte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt8(entity).HasValue), + byte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt8(instance).HasValue)); nullableUInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(nullableUInt8, 212), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[212]); + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(nullableUInt8, 212), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(nullableUInt8), + object (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( index: 212, originalValueIndex: 212, @@ -14736,21 +14523,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); nullableUInt8.SetValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.Comparer)); nullableUInt8.SetKeyValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.KeyComparer)); nullableUInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8", "TestNamespace") }); var nullableUInt8Array = runtimeEntityType.AddProperty( "NullableUInt8Array", @@ -14758,20 +14544,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance) == null); + byte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) == null, + byte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance) == null); nullableUInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[]>(nullableUInt8Array, 213), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[213]); + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? []>(nullableUInt8Array, 213), + byte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? []>(nullableUInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( index: 213, originalValueIndex: 213, @@ -14780,17 +14566,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14802,19 +14588,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); nullableUInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array", "TestNamespace") }); var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( "NullableUInt8NestedCollection", @@ -14822,20 +14607,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance) == null); + byte? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) == null, + byte? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance) == null); nullableUInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[][]>(nullableUInt8NestedCollection, 214), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[214]); + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? [][]>(nullableUInt8NestedCollection, 214), + byte? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[214]); nullableUInt8NestedCollection.SetPropertyIndexes( index: 214, originalValueIndex: 214, @@ -14844,17 +14629,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14868,17 +14653,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14890,19 +14675,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))); nullableUInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection", "TestNamespace") }); var nullableUri = runtimeEntityType.AddProperty( "NullableUri", @@ -14911,20 +14695,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance) == null); nullableUri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[215]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), + object (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( index: 215, originalValueIndex: 215, @@ -14933,32 +14717,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUri.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); nullableUri.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri", "TestNamespace") }); var nullableUriArray = runtimeEntityType.AddProperty( "NullableUriArray", @@ -14966,20 +14749,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance) == null); nullableUriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[216]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), + object (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( index: 216, originalValueIndex: 216, @@ -14988,17 +14771,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15007,43 +14790,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); nullableUriArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray", "TestNamespace") }); var physicalAddress = runtimeEntityType.AddProperty( "PhysicalAddress", @@ -15051,20 +14833,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance) == null); physicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[217]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( index: 217, originalValueIndex: 217, @@ -15073,32 +14855,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); physicalAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress", "TestNamespace") }); var physicalAddressArray = runtimeEntityType.AddProperty( "PhysicalAddressArray", @@ -15106,20 +14887,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance) == null); physicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( index: 218, originalValueIndex: 218, @@ -15128,17 +14909,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15147,43 +14928,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); physicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray", "TestNamespace") }); var physicalAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToBytesConverterProperty", @@ -15192,20 +14972,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToBytesConverter()); physicalAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance) == null); physicalAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( index: 219, originalValueIndex: 219, @@ -15214,30 +14994,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(8)", size: 8), converter: new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)), + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)))); + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)))); physicalAddressToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty", "TestNamespace") }); var physicalAddressToStringConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToStringConverterProperty", @@ -15246,20 +15025,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToStringConverter()); physicalAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance) == null); physicalAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( index: 220, originalValueIndex: 220, @@ -15268,32 +15047,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); physicalAddressToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty", "TestNamespace") }); var @string = runtimeEntityType.AddProperty( "String", @@ -15301,20 +15079,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("String", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<String>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @string.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance) == null); @string.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), - (ValueBuffer valueBuffer) => valueBuffer[221]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), + object (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( index: 221, originalValueIndex: 221, @@ -15323,24 +15101,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @string.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); @string.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @string.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String", "TestNamespace") }); var stringArray = runtimeEntityType.AddProperty( "StringArray", @@ -15348,20 +15125,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance) == null); stringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), + object (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( index: 222, originalValueIndex: 222, @@ -15370,17 +15147,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15392,24 +15169,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - stringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray", "TestNamespace") }); var stringNestedCollection = runtimeEntityType.AddProperty( "StringNestedCollection", @@ -15417,20 +15193,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance) == null); stringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[223]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[223]); stringNestedCollection.SetPropertyIndexes( index: 223, originalValueIndex: 223, @@ -15439,17 +15215,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15463,17 +15239,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15485,24 +15261,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - stringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection", "TestNamespace") }); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -15511,20 +15286,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBoolConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToBoolConverter()); stringToBoolConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance) == null); stringToBoolConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( index: 224, originalValueIndex: 224, @@ -15533,27 +15308,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBoolConverterProperty.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), converter: new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)), + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, bool>( JsonBoolReaderWriter.Instance, new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)))); + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)))); stringToBoolConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToBoolConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty", "TestNamespace") }); var stringToBytesConverterProperty = runtimeEntityType.AddProperty( "StringToBytesConverterProperty", @@ -15562,20 +15336,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); stringToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance) == null); stringToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[225]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( index: 225, originalValueIndex: 225, @@ -15584,30 +15358,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), converter: new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); stringToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty", "TestNamespace") }); var stringToCharConverterProperty = runtimeEntityType.AddProperty( "StringToCharConverterProperty", @@ -15616,20 +15389,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToCharConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToCharConverter()); stringToCharConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance) == null); stringToCharConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[226]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( index: 226, originalValueIndex: 226, @@ -15638,32 +15411,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToCharConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<string, string>( - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0])), - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0]))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0])))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0]))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0])), - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0]))))); + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0])))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0]))))))); stringToCharConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToCharConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty", "TestNamespace") }); var stringToDateOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToDateOnlyConverterProperty", @@ -15672,20 +15444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateOnlyConverter()); stringToDateOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance) == null); stringToDateOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[227]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( index: 227, originalValueIndex: 227, @@ -15694,29 +15466,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateOnlyConverterProperty.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateOnly>( JsonDateOnlyReaderWriter.Instance, new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); stringToDateOnlyConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty", "TestNamespace") }); var stringToDateTimeConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeConverterProperty", @@ -15725,20 +15496,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeConverter()); stringToDateTimeConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance) == null); stringToDateTimeConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[228]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( index: 228, originalValueIndex: 228, @@ -15747,29 +15518,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeConverterProperty.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTime>( JsonDateTimeReaderWriter.Instance, new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); stringToDateTimeConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateTimeConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty", "TestNamespace") }); var stringToDateTimeOffsetConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeOffsetConverterProperty", @@ -15778,20 +15548,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeOffsetConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeOffsetConverter()); stringToDateTimeOffsetConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance) == null); stringToDateTimeOffsetConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[229]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( index: 229, originalValueIndex: 229, @@ -15800,29 +15570,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeOffsetConverterProperty.TypeMapping = SqlServerDateTimeOffsetTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTimeOffset>( JsonDateTimeOffsetReaderWriter.Instance, new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); stringToDateTimeOffsetConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateTimeOffsetConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty", "TestNamespace") }); var stringToDecimalNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDecimalNumberConverterProperty", @@ -15831,20 +15600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDecimalNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<decimal>()); stringToDecimalNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance) == null); stringToDecimalNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[230]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( index: 230, originalValueIndex: 230, @@ -15853,29 +15622,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDecimalNumberConverterProperty.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); stringToDecimalNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDecimalNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty", "TestNamespace") }); var stringToDoubleNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDoubleNumberConverterProperty", @@ -15884,20 +15652,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDoubleNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<double>()); stringToDoubleNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance) == null); stringToDoubleNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[231]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( index: 231, originalValueIndex: 231, @@ -15906,29 +15674,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDoubleNumberConverterProperty.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, double>( JsonDoubleReaderWriter.Instance, new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)))); + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))))); stringToDoubleNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDoubleNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty", "TestNamespace") }); var stringToEnumConverterProperty = runtimeEntityType.AddProperty( "StringToEnumConverterProperty", @@ -15937,20 +15704,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToEnumConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToEnumConverter<CompiledModelTestBase.EnumU32>()); stringToEnumConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance) == null); stringToEnumConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[232]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( index: 232, originalValueIndex: 232, @@ -15959,27 +15726,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToEnumConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<string, long>( - (string v) => (long)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (long value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()), + long (string v) => ((long)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (long value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<string, long>( - (string v) => (long)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (long value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()))); + long (string v) => ((long)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (long value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()))); stringToEnumConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToEnumConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty", "TestNamespace") }); var stringToGuidConverterProperty = runtimeEntityType.AddProperty( "StringToGuidConverterProperty", @@ -15987,20 +15753,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToGuidConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToGuidConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringToGuidConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance) == null); stringToGuidConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[233]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( index: 233, originalValueIndex: 233, @@ -16009,24 +15775,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToGuidConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); stringToGuidConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToGuidConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty", "TestNamespace") }); var stringToIntNumberConverterProperty = runtimeEntityType.AddProperty( "StringToIntNumberConverterProperty", @@ -16035,20 +15800,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToIntNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<int>()); stringToIntNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance) == null); stringToIntNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[234]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( index: 234, originalValueIndex: 234, @@ -16057,29 +15822,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToIntNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); stringToIntNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToIntNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty", "TestNamespace") }); var stringToTimeOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToTimeOnlyConverterProperty", @@ -16088,20 +15852,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeOnlyConverter()); stringToTimeOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance) == null); stringToTimeOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( index: 235, originalValueIndex: 235, @@ -16110,29 +15874,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeOnlyConverterProperty.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeOnly>( JsonTimeOnlyReaderWriter.Instance, new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")))); + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))))); stringToTimeOnlyConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToTimeOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty", "TestNamespace") }); var stringToTimeSpanConverterProperty = runtimeEntityType.AddProperty( "StringToTimeSpanConverterProperty", @@ -16141,20 +15904,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeSpanConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeSpanConverter()); stringToTimeSpanConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance) == null); stringToTimeSpanConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[236]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( index: 236, originalValueIndex: 236, @@ -16163,29 +15926,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeSpanConverterProperty.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeSpan>( JsonTimeSpanReaderWriter.Instance, new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")))); + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")))); stringToTimeSpanConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToTimeSpanConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty", "TestNamespace") }); var stringToUriConverterProperty = runtimeEntityType.AddProperty( "StringToUriConverterProperty", @@ -16194,20 +15956,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToUriConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToUriConverter()); stringToUriConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance) == null); stringToUriConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[237]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( index: 237, originalValueIndex: 237, @@ -16216,32 +15978,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToUriConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); stringToUriConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToUriConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty", "TestNamespace") }); var timeOnly = runtimeEntityType.AddProperty( "TimeOnly", @@ -16250,20 +16011,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeOnly(0, 0, 0)); timeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance) == default(TimeOnly)); timeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[238]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( index: 238, originalValueIndex: 238, @@ -16272,19 +16033,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnly.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)); timeOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly", "TestNamespace") }); var timeOnlyArray = runtimeEntityType.AddProperty( "TimeOnlyArray", @@ -16292,20 +16052,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance) == null); + TimeOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) == null, + TimeOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance) == null); timeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[239]); + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), + TimeOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( index: 239, originalValueIndex: 239, @@ -16314,17 +16074,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), keyComparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16336,19 +16096,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))); timeOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray", "TestNamespace") }); var timeOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToStringConverterProperty", @@ -16357,20 +16116,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToStringConverter()); timeOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); timeOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[240]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( index: 240, originalValueIndex: 240, @@ -16379,33 +16138,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); timeOnlyToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); timeOnlyToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty", "TestNamespace") }); var timeOnlyToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToTicksConverterProperty", @@ -16414,20 +16172,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToTicksConverter()); timeOnlyToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); timeOnlyToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[241]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( index: 241, originalValueIndex: 241, @@ -16436,28 +16194,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToTicksConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)), + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)))); + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)))); timeOnlyToTicksConverterProperty.SetSentinelFromProviderValue(0L); timeOnlyToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty", "TestNamespace") }); var timeSpan = runtimeEntityType.AddProperty( "TimeSpan", @@ -16466,20 +16223,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeSpan(0, 0, 0, 0, 0)); timeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance) == default(TimeSpan)); timeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[242]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( index: 242, originalValueIndex: 242, @@ -16488,19 +16245,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpan.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)); timeSpan.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan", "TestNamespace") }); var timeSpanArray = runtimeEntityType.AddProperty( "TimeSpanArray", @@ -16508,20 +16264,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance) == null); + TimeSpan[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) == null, + TimeSpan[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance) == null); timeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[243]); + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), + TimeSpan[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( index: 243, originalValueIndex: 243, @@ -16530,17 +16286,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), keyComparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16552,19 +16308,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))); timeSpanArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray", "TestNamespace") }); var timeSpanToStringConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToStringConverterProperty", @@ -16573,20 +16328,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToStringConverter()); timeSpanToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); timeSpanToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[244]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( index: 244, originalValueIndex: 244, @@ -16595,33 +16350,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); timeSpanToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); timeSpanToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty", "TestNamespace") }); var timeSpanToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToTicksConverterProperty", @@ -16630,20 +16384,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToTicksConverter()); timeSpanToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); timeSpanToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[245]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( index: 245, originalValueIndex: 245, @@ -16652,28 +16406,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToTicksConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)), + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)))); + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)))); timeSpanToTicksConverterProperty.SetSentinelFromProviderValue(0L); timeSpanToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty", "TestNamespace") }); var uInt16 = runtimeEntityType.AddProperty( "UInt16", @@ -16681,20 +16434,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance) == 0); + ushort (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity) == 0, + ushort (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance) == 0); uInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[246]); + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), + ushort (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), + object (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( index: 246, originalValueIndex: 246, @@ -16703,28 +16456,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))); uInt16.SetSentinelFromProviderValue(0); uInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16", "TestNamespace") }); var uInt16Array = runtimeEntityType.AddProperty( "UInt16Array", @@ -16732,20 +16484,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance) == null); + ushort[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity) == null, + ushort[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance) == null); uInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[247]); + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), + ushort[] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( index: 247, originalValueIndex: 247, @@ -16754,17 +16506,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), keyComparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16773,38 +16525,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))); uInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array", "TestNamespace") }); var uInt32 = runtimeEntityType.AddProperty( "UInt32", @@ -16812,20 +16563,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) == 0U, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance) == 0U); + uint (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity) == 0U, + uint (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance) == 0U); uInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[248]); + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), + uint (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), + object (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( index: 248, originalValueIndex: 248, @@ -16834,28 +16585,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))); uInt32.SetSentinelFromProviderValue(0L); uInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32", "TestNamespace") }); var uInt32Array = runtimeEntityType.AddProperty( "UInt32Array", @@ -16863,20 +16613,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance) == null); + uint[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity) == null, + uint[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance) == null); uInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[249]); + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), + uint[] (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( index: 249, originalValueIndex: 249, @@ -16885,17 +16635,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), keyComparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16904,38 +16654,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<uint[], uint>( new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))); uInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array", "TestNamespace") }); var uInt64 = runtimeEntityType.AddProperty( "UInt64", @@ -16943,20 +16692,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) == 0UL, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance) == 0UL); + ulong (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity) == 0UL, + ulong (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance) == 0UL); uInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[250]); + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), + ulong (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), + object (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( index: 250, originalValueIndex: 250, @@ -16965,32 +16714,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))); uInt64.SetSentinelFromProviderValue(0m); uInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64", "TestNamespace") }); var uInt64Array = runtimeEntityType.AddProperty( "UInt64Array", @@ -16998,20 +16746,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance) == null); + ulong[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity) == null, + ulong[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance) == null); uInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[251]); + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), + ulong[] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( index: 251, originalValueIndex: 251, @@ -17020,17 +16768,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), keyComparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17039,42 +16787,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))); uInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array", "TestNamespace") }); var uInt8 = runtimeEntityType.AddProperty( "UInt8", @@ -17083,20 +16830,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (byte)0); uInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance) == 0); + byte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity) == 0, + byte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance) == 0); uInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[252]); + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), + byte (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), + object (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( index: 252, originalValueIndex: 252, @@ -17105,19 +16852,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); uInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8", "TestNamespace") }); var uInt8Array = runtimeEntityType.AddProperty( "UInt8Array", @@ -17125,20 +16871,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance) == null); uInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[253]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( index: 253, originalValueIndex: 253, @@ -17147,22 +16893,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8Array.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); uInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array", "TestNamespace") }); var uInt8NestedCollection = runtimeEntityType.AddProperty( "UInt8NestedCollection", @@ -17170,20 +16915,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance) == null); + List<byte[]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) == null, + List<byte[]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance) == null); uInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[254]); + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), + List<byte[]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[254]); uInt8NestedCollection.SetPropertyIndexes( index: 254, originalValueIndex: 254, @@ -17192,17 +16937,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17214,22 +16959,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); uInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection", "TestNamespace") }); var uri = runtimeEntityType.AddProperty( "Uri", @@ -17237,20 +16981,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Uri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Uri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance) == null); uri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), - (ValueBuffer valueBuffer) => valueBuffer[255]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), + object (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( index: 255, originalValueIndex: 255, @@ -17259,32 +17003,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uri.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); uri.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri", "TestNamespace") }); var uriArray = runtimeEntityType.AddProperty( "UriArray", @@ -17292,20 +17035,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance) == null); uriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[256]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), + object (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( index: 256, originalValueIndex: 256, @@ -17314,17 +17057,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17333,43 +17076,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); uriArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray", "TestNamespace") }); var uriToStringConverterProperty = runtimeEntityType.AddProperty( "UriToStringConverterProperty", @@ -17378,20 +17120,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new UriToStringConverter()); uriToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance) == null); uriToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[257]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( index: 257, originalValueIndex: 257, @@ -17400,32 +17142,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); uriToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uriToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -17698,40 +17439,40 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<CompiledModelTestBase.ManyTypesId>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<CompiledModelTestBase.ManyTypesId>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)((IProperty)@bool).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(@bool)), (IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray) == null ? null : (bool[])((ValueComparer<IEnumerable<bool>>)((IProperty)boolArray).GetValueComparer()).Snapshot((IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray)), (object)source.GetCurrentValue<bool[][]>(boolNestedCollection) == null ? null : (bool[][])((ValueComparer<object>)((IProperty)boolNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<bool[][]>(boolNestedCollection)), ((ValueComparer<bool>)((IProperty)boolToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToTwoValuesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToZeroOneConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytes)), (object)source.GetCurrentValue<byte[][]>(bytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)bytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(bytesArray)), (object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)bytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection)), source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytesToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty)), ((ValueComparer<int>)((IProperty)castingConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)((IProperty)@char).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(@char)), (IEnumerable<char>)source.GetCurrentValue<char[]>(charArray) == null ? null : (char[])((ValueComparer<IEnumerable<char>>)((IProperty)charArray).GetValueComparer()).Snapshot((IEnumerable<char>)source.GetCurrentValue<char[]>(charArray)), (object)source.GetCurrentValue<char[][]>(charNestedCollection) == null ? null : (char[][])((ValueComparer<object>)((IProperty)charNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<char[][]>(charNestedCollection)), ((ValueComparer<char>)((IProperty)charToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)((IProperty)dateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer<IEnumerable<DateOnly>>)((IProperty)dateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray)), ((ValueComparer<DateOnly>)((IProperty)dateOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)dateTimeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)((IProperty)@decimal).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray) == null ? null : (decimal[])((ValueComparer<IEnumerable<decimal>>)((IProperty)decimalArray).GetValueComparer()).Snapshot((IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray)), ((ValueComparer<decimal>)((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))); - var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)((IProperty)decimalNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)((IProperty)@double).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(@double)), (IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray) == null ? null : (double[])((ValueComparer<IEnumerable<double>>)((IProperty)doubleArray).GetValueComparer()).Snapshot((IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray)), ((ValueComparer<double>)((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)((IProperty)doubleNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection)), (object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection) == null ? null : (List<CompiledModelTestBase.Enum32>[][])((ValueComparer<object>)((IProperty)enum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))); - var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer<object>)((IProperty)enum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection)), (object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer<object>)((IProperty)enumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection)), ((ValueComparer<float>)((IProperty)@float).GetValueComparer()).Snapshot(source.GetCurrentValue<float>(@float)), (IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray) == null ? null : (float[])((ValueComparer<IEnumerable<float>>)((IProperty)floatArray).GetValueComparer()).Snapshot((IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray))); - var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, Nullable<int>, Nullable<bool>, Nullable<bool>[], byte[], byte[][], byte[][][], Nullable<char>, Nullable<char>[]>(((ValueComparer<Guid>)((IProperty)guid).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guid)), (IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray) == null ? null : (Guid[])((ValueComparer<IEnumerable<Guid>>)((IProperty)guidArray).GetValueComparer()).Snapshot((IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray)), (object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection) == null ? null : (ICollection<Guid[][]>)((ValueComparer<object>)((IProperty)guidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection)), ((ValueComparer<Guid>)((IProperty)guidToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)((IProperty)guidToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress)), (object)source.GetCurrentValue<IPAddress[]>(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)iPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(iPAddressArray)), source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty)), ((ValueComparer<short>)((IProperty)int16).GetValueComparer()).Snapshot(source.GetCurrentValue<short>(int16)), (IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array) == null ? null : (short[])((ValueComparer<IEnumerable<short>>)((IProperty)int16Array).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array)), ((ValueComparer<int>)((IProperty)int32).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(int32)), (IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array) == null ? null : (int[])((ValueComparer<IEnumerable<int>>)((IProperty)int32Array).GetValueComparer()).Snapshot((IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array)), (object)source.GetCurrentValue<int[][]>(int32NestedCollection) == null ? null : (int[][])((ValueComparer<object>)((IProperty)int32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<int[][]>(int32NestedCollection)), ((ValueComparer<long>)((IProperty)int64).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(int64)), (IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array) == null ? null : (long[])((ValueComparer<IEnumerable<long>>)((IProperty)int64Array).GetValueComparer()).Snapshot((IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array)), (object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection) == null ? null : (IList<long[]>[])((ValueComparer<object>)((IProperty)int64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection)), ((ValueComparer<sbyte>)((IProperty)int8).GetValueComparer()).Snapshot(source.GetCurrentValue<sbyte>(int8)), (IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array) == null ? null : (sbyte[])((ValueComparer<IEnumerable<sbyte>>)((IProperty)int8Array).GetValueComparer()).Snapshot((IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array)), (object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer<object>)((IProperty)int8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection)), ((ValueComparer<int>)((IProperty)intNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)((IProperty)intNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullIntToNullStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty)), source.GetCurrentValue<Nullable<bool>>(nullableBool) == null ? null : ((ValueComparer<Nullable<bool>>)((IProperty)nullableBool).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<bool>>(nullableBool)), (IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray) == null ? null : (Nullable<bool>[])((ValueComparer<IEnumerable<Nullable<bool>>>)((IProperty)nullableBoolArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray)), source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)nullableBytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes)), (object)source.GetCurrentValue<byte[][]>(nullableBytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)nullableBytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(nullableBytesArray)), (object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)nullableBytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection)), source.GetCurrentValue<Nullable<char>>(nullableChar) == null ? null : ((ValueComparer<Nullable<char>>)((IProperty)nullableChar).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<char>>(nullableChar)), (IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray) == null ? null : (Nullable<char>[])((ValueComparer<IEnumerable<Nullable<char>>>)((IProperty)nullableCharArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray))); - var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot<Nullable<DateOnly>, Nullable<DateOnly>[], Nullable<DateTime>, Nullable<DateTime>[], Nullable<decimal>, Nullable<decimal>[], Nullable<double>, Nullable<double>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], List<Nullable<CompiledModelTestBase.Enum16>>, List<Nullable<CompiledModelTestBase.Enum16>>, Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], List<Nullable<CompiledModelTestBase.Enum32>>, List<Nullable<CompiledModelTestBase.Enum32>>, Nullable<CompiledModelTestBase.Enum32>[][][], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], List<Nullable<CompiledModelTestBase.Enum64>>, List<Nullable<CompiledModelTestBase.Enum64>>, Nullable<CompiledModelTestBase.Enum8>, Nullable<CompiledModelTestBase.Enum8>[], Nullable<CompiledModelTestBase.Enum8>>(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly) == null ? null : ((ValueComparer<Nullable<DateOnly>>)((IProperty)nullableDateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly)), (IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray) == null ? null : (Nullable<DateOnly>[])((ValueComparer<IEnumerable<Nullable<DateOnly>>>)((IProperty)nullableDateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray)), source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime) == null ? null : ((ValueComparer<Nullable<DateTime>>)((IProperty)nullableDateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime)), (IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray) == null ? null : (Nullable<DateTime>[])((ValueComparer<IEnumerable<Nullable<DateTime>>>)((IProperty)nullableDateTimeArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray)), source.GetCurrentValue<Nullable<decimal>>(nullableDecimal) == null ? null : ((ValueComparer<Nullable<decimal>>)((IProperty)nullableDecimal).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<decimal>>(nullableDecimal)), (IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray) == null ? null : (Nullable<decimal>[])((ValueComparer<IEnumerable<Nullable<decimal>>>)((IProperty)nullableDecimalArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray)), source.GetCurrentValue<Nullable<double>>(nullableDouble) == null ? null : ((ValueComparer<Nullable<double>>)((IProperty)nullableDouble).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<double>>(nullableDouble)), (IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray) == null ? null : (Nullable<double>[])((ValueComparer<IEnumerable<Nullable<double>>>)((IProperty)nullableDoubleArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[][][])((ValueComparer<object>)((IProperty)nullableEnum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString))); - var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot<Nullable<CompiledModelTestBase.Enum8>[], List<Nullable<CompiledModelTestBase.Enum8>>, List<Nullable<CompiledModelTestBase.Enum8>>, Nullable<CompiledModelTestBase.Enum8>[][], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], List<Nullable<CompiledModelTestBase.EnumU16>>, List<Nullable<CompiledModelTestBase.EnumU16>>, Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], List<Nullable<CompiledModelTestBase.EnumU32>>, List<Nullable<CompiledModelTestBase.EnumU32>>, Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], List<Nullable<CompiledModelTestBase.EnumU64>>, List<Nullable<CompiledModelTestBase.EnumU64>>, Nullable<CompiledModelTestBase.EnumU64>[][], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], List<Nullable<CompiledModelTestBase.EnumU8>>, List<Nullable<CompiledModelTestBase.EnumU8>>, Nullable<float>>((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[][])((ValueComparer<object>)((IProperty)nullableEnum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[][])((ValueComparer<object>)((IProperty)nullableEnumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection)), source.GetCurrentValue<Nullable<float>>(nullableFloat) == null ? null : ((ValueComparer<Nullable<float>>)((IProperty)nullableFloat).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<float>>(nullableFloat))); - var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot<Nullable<float>[], Nullable<Guid>, Nullable<Guid>[], Nullable<Guid>[][], IPAddress, IPAddress[], Nullable<short>, Nullable<short>[], Nullable<int>, Nullable<int>[], Nullable<int>[][], Nullable<long>, Nullable<long>[], List<Nullable<long>[][]>, Nullable<sbyte>, Nullable<sbyte>[], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], Nullable<TimeOnly>, Nullable<TimeOnly>[], Nullable<TimeSpan>, Nullable<TimeSpan>[], Nullable<ushort>, Nullable<ushort>[], Nullable<uint>, Nullable<uint>[]>((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray) == null ? null : (Nullable<float>[])((ValueComparer<IEnumerable<Nullable<float>>>)((IProperty)nullableFloatArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray)), source.GetCurrentValue<Nullable<Guid>>(nullableGuid) == null ? null : ((ValueComparer<Nullable<Guid>>)((IProperty)nullableGuid).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<Guid>>(nullableGuid)), (IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray) == null ? null : (Nullable<Guid>[])((ValueComparer<IEnumerable<Nullable<Guid>>>)((IProperty)nullableGuidArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray)), (object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection) == null ? null : (Nullable<Guid>[][])((ValueComparer<object>)((IProperty)nullableGuidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection)), source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)nullableIPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress)), (object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)nullableIPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray)), source.GetCurrentValue<Nullable<short>>(nullableInt16) == null ? null : ((ValueComparer<Nullable<short>>)((IProperty)nullableInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<short>>(nullableInt16)), (IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array) == null ? null : (Nullable<short>[])((ValueComparer<IEnumerable<Nullable<short>>>)((IProperty)nullableInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array)), source.GetCurrentValue<Nullable<int>>(nullableInt32) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullableInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullableInt32)), (IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array) == null ? null : (Nullable<int>[])((ValueComparer<IEnumerable<Nullable<int>>>)((IProperty)nullableInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array)), (object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection) == null ? null : (Nullable<int>[][])((ValueComparer<object>)((IProperty)nullableInt32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection)), source.GetCurrentValue<Nullable<long>>(nullableInt64) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)nullableInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(nullableInt64)), (IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array) == null ? null : (Nullable<long>[])((ValueComparer<IEnumerable<Nullable<long>>>)((IProperty)nullableInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array)), (object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection) == null ? null : (List<Nullable<long>[][]>)((ValueComparer<object>)((IProperty)nullableInt64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue<Nullable<sbyte>>(nullableInt8) == null ? null : ((ValueComparer<Nullable<sbyte>>)((IProperty)nullableInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<sbyte>>(nullableInt8)), (IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array) == null ? null : (Nullable<sbyte>[])((ValueComparer<IEnumerable<Nullable<sbyte>>>)((IProperty)nullableInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array)), source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)nullablePhysicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)nullablePhysicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray)), (object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable<PhysicalAddress[][]>)((ValueComparer<object>)((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)((IProperty)nullableString).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(nullableString)), (object)source.GetCurrentValue<string[]>(nullableStringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)nullableStringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(nullableStringArray)), (object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)nullableStringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection)), source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly) == null ? null : ((ValueComparer<Nullable<TimeOnly>>)((IProperty)nullableTimeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly)), (IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray) == null ? null : (Nullable<TimeOnly>[])((ValueComparer<IEnumerable<Nullable<TimeOnly>>>)((IProperty)nullableTimeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray)), source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan) == null ? null : ((ValueComparer<Nullable<TimeSpan>>)((IProperty)nullableTimeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan)), (IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray) == null ? null : (Nullable<TimeSpan>[])((ValueComparer<IEnumerable<Nullable<TimeSpan>>>)((IProperty)nullableTimeSpanArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray)), source.GetCurrentValue<Nullable<ushort>>(nullableUInt16) == null ? null : ((ValueComparer<Nullable<ushort>>)((IProperty)nullableUInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ushort>>(nullableUInt16)), (IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array) == null ? null : (Nullable<ushort>[])((ValueComparer<IEnumerable<Nullable<ushort>>>)((IProperty)nullableUInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array)), source.GetCurrentValue<Nullable<uint>>(nullableUInt32) == null ? null : ((ValueComparer<Nullable<uint>>)((IProperty)nullableUInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<uint>>(nullableUInt32)), (IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array) == null ? null : (Nullable<uint>[])((ValueComparer<IEnumerable<Nullable<uint>>>)((IProperty)nullableUInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array))); - var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg6 = (ISnapshot)new Snapshot<Nullable<ulong>, Nullable<ulong>[], Nullable<byte>, Nullable<byte>[], Nullable<byte>[][], 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<Nullable<ulong>>(nullableUInt64) == null ? null : ((ValueComparer<Nullable<ulong>>)((IProperty)nullableUInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ulong>>(nullableUInt64)), (IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array) == null ? null : (Nullable<ulong>[])((ValueComparer<IEnumerable<Nullable<ulong>>>)((IProperty)nullableUInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array)), source.GetCurrentValue<Nullable<byte>>(nullableUInt8) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)nullableUInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(nullableUInt8)), (IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array) == null ? null : (Nullable<byte>[])((ValueComparer<IEnumerable<Nullable<byte>>>)((IProperty)nullableUInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array)), (object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable<byte>[][])((ValueComparer<object>)((IProperty)nullableUInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)((IProperty)nullableUri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(nullableUri)), (object)source.GetCurrentValue<Uri[]>(nullableUriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)nullableUriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(nullableUriArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)physicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty)), source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)((IProperty)@string).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(@string)), (object)source.GetCurrentValue<string[]>(stringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)stringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(stringArray)), (object)source.GetCurrentValue<string[][]>(stringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)stringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(stringNestedCollection)), source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBoolConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty)), source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty)), source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToCharConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty)), source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty)), source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty)), source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToEnumConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty)), source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToGuidConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty)), source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToIntNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty)), source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty)), source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeSpanConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty)), source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToUriConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer<IEnumerable<TimeOnly>>)((IProperty)timeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))); - var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)((IProperty)timeOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer<IEnumerable<TimeSpan>>)((IProperty)timeSpanArray).GetValueComparer()).Snapshot((IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)((IProperty)uInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array) == null ? null : (ushort[])((ValueComparer<IEnumerable<ushort>>)((IProperty)uInt16Array).GetValueComparer()).Snapshot((IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array)), ((ValueComparer<uint>)((IProperty)uInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<uint>(uInt32)), (IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array) == null ? null : (uint[])((ValueComparer<IEnumerable<uint>>)((IProperty)uInt32Array).GetValueComparer()).Snapshot((IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array)), ((ValueComparer<ulong>)((IProperty)uInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array) == null ? null : (ulong[])((ValueComparer<IEnumerable<ulong>>)((IProperty)uInt64Array).GetValueComparer()).Snapshot((IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array)), ((ValueComparer<byte>)((IProperty)uInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<byte>(uInt8)), source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)((IProperty)uInt8Array).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array)), (object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection) == null ? null : (List<byte[]>)((ValueComparer<object>)((IProperty)uInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection)), source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)((IProperty)uri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uri)), (object)source.GetCurrentValue<Uri[]>(uriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)uriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(uriArray)), source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)((IProperty)uriToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty))) }); + var entity = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)(((IProperty)@bool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(@bool)), (((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))) == null ? null : ((bool[])(((ValueComparer<IEnumerable<bool>>)(((IProperty)boolArray).GetValueComparer())).Snapshot(((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))))))), (((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))) == null ? null : ((bool[][])(((ValueComparer<object>)(((IProperty)boolNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))))))), ((ValueComparer<bool>)(((IProperty)boolToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToTwoValuesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToZeroOneConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), (source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytes))), (((object)(source.GetCurrentValue<byte[][]>(bytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)bytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(bytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)bytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))))))), (source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytesToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty))), ((ValueComparer<int>)(((IProperty)castingConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)(((IProperty)@char).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(@char)), (((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))) == null ? null : ((char[])(((ValueComparer<IEnumerable<char>>)(((IProperty)charArray).GetValueComparer())).Snapshot(((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))))))), (((object)(source.GetCurrentValue<char[][]>(charNestedCollection))) == null ? null : ((char[][])(((ValueComparer<object>)(((IProperty)charNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<char[][]>(charNestedCollection))))))), ((ValueComparer<char>)(((IProperty)charToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)(((IProperty)dateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))) == null ? null : ((DateOnly[])(((ValueComparer<IEnumerable<DateOnly>>)(((IProperty)dateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))))))), ((ValueComparer<DateOnly>)(((IProperty)dateOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)dateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))))))), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)(((IProperty)@decimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))) == null ? null : ((decimal[])(((ValueComparer<IEnumerable<decimal>>)(((IProperty)decimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))))))), ((ValueComparer<decimal>)(((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))))); + var entity0 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)(((IProperty)decimalNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)(((IProperty)@double).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(@double)), (((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))) == null ? null : ((double[])(((ValueComparer<IEnumerable<double>>)(((IProperty)doubleArray).GetValueComparer())).Snapshot(((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))))))), ((ValueComparer<double>)(((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)(((IProperty)doubleNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))))))), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))))))), (((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>[][])(((ValueComparer<object>)(((IProperty)enum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection)))))))))); + var entity1 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg1 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8[][])(((ValueComparer<object>)(((IProperty)enum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64[][])(((ValueComparer<object>)(((IProperty)enumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))))))), ((ValueComparer<float>)(((IProperty)@float).GetValueComparer())).Snapshot(source.GetCurrentValue<float>(@float)), (((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray))) == null ? null : ((float[])(((ValueComparer<IEnumerable<float>>)(((IProperty)floatArray).GetValueComparer())).Snapshot(((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray)))))))))); + var entity2 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg2 = ((ISnapshot)(new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, int?, bool?, bool? [], byte[], byte[][], byte[][][], char?, char? []>(((ValueComparer<Guid>)(((IProperty)guid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guid)), (((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))) == null ? null : ((Guid[])(((ValueComparer<IEnumerable<Guid>>)(((IProperty)guidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))))))), (((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))) == null ? null : ((ICollection<Guid[][]>)(((ValueComparer<object>)(((IProperty)guidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))))))), ((ValueComparer<Guid>)(((IProperty)guidToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)(((IProperty)guidToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), (source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)iPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))))))), (source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty))), (source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty))), ((ValueComparer<short>)(((IProperty)int16).GetValueComparer())).Snapshot(source.GetCurrentValue<short>(int16)), (((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))) == null ? null : ((short[])(((ValueComparer<IEnumerable<short>>)(((IProperty)int16Array).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))))))), ((ValueComparer<int>)(((IProperty)int32).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(int32)), (((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))) == null ? null : ((int[])(((ValueComparer<IEnumerable<int>>)(((IProperty)int32Array).GetValueComparer())).Snapshot(((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))))))), (((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))) == null ? null : ((int[][])(((ValueComparer<object>)(((IProperty)int32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))))))), ((ValueComparer<long>)(((IProperty)int64).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(int64)), (((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))) == null ? null : ((long[])(((ValueComparer<IEnumerable<long>>)(((IProperty)int64Array).GetValueComparer())).Snapshot(((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))))))), (((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))) == null ? null : ((IList<long[]>[])(((ValueComparer<object>)(((IProperty)int64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))))))), ((ValueComparer<sbyte>)(((IProperty)int8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte>(int8)), (((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))) == null ? null : ((sbyte[])(((ValueComparer<IEnumerable<sbyte>>)(((IProperty)int8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))))))), (((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))) == null ? null : ((sbyte[][][])(((ValueComparer<object>)(((IProperty)int8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))))))), ((ValueComparer<int>)(((IProperty)intNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)(((IProperty)intNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), (source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<int?>)(((IProperty)nullIntToNullStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty))), (source.GetCurrentValue<bool?>(nullableBool) == null ? null : ((ValueComparer<bool?>)(((IProperty)nullableBool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool?>(nullableBool))), (((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))) == null ? null : ((bool? [])(((ValueComparer<IEnumerable<bool?>>)(((IProperty)nullableBoolArray).GetValueComparer())).Snapshot(((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))))))), (source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)nullableBytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes))), (((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)nullableBytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)nullableBytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))))))), (source.GetCurrentValue<char?>(nullableChar) == null ? null : ((ValueComparer<char?>)(((IProperty)nullableChar).GetValueComparer())).Snapshot(source.GetCurrentValue<char?>(nullableChar))), (((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray))) == null ? null : ((char? [])(((ValueComparer<IEnumerable<char?>>)(((IProperty)nullableCharArray).GetValueComparer())).Snapshot(((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray)))))))))); + var entity3 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg3 = ((ISnapshot)(new Snapshot<DateOnly?, DateOnly? [], DateTime?, DateTime? [], decimal?, decimal? [], double?, double? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], List<CompiledModelTestBase.Enum16?>, List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], List<CompiledModelTestBase.Enum32?>, List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32? [][][], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], List<CompiledModelTestBase.Enum64?>, List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum8?, CompiledModelTestBase.Enum8? [], CompiledModelTestBase.Enum8?>((source.GetCurrentValue<DateOnly?>(nullableDateOnly) == null ? null : ((ValueComparer<DateOnly?>)(((IProperty)nullableDateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly?>(nullableDateOnly))), (((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))) == null ? null : ((DateOnly? [])(((ValueComparer<IEnumerable<DateOnly?>>)(((IProperty)nullableDateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))))))), (source.GetCurrentValue<DateTime?>(nullableDateTime) == null ? null : ((ValueComparer<DateTime?>)(((IProperty)nullableDateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime?>(nullableDateTime))), (((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))) == null ? null : ((DateTime? [])(((ValueComparer<IEnumerable<DateTime?>>)(((IProperty)nullableDateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))))))), (source.GetCurrentValue<decimal?>(nullableDecimal) == null ? null : ((ValueComparer<decimal?>)(((IProperty)nullableDecimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal?>(nullableDecimal))), (((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))) == null ? null : ((decimal? [])(((ValueComparer<IEnumerable<decimal?>>)(((IProperty)nullableDecimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))))))), (source.GetCurrentValue<double?>(nullableDouble) == null ? null : ((ValueComparer<double?>)(((IProperty)nullableDouble).GetValueComparer())).Snapshot(source.GetCurrentValue<double?>(nullableDouble))), (((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))) == null ? null : ((double? [])(((ValueComparer<IEnumerable<double?>>)(((IProperty)nullableDoubleArray).GetValueComparer())).Snapshot(((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum32? [][][])(((ValueComparer<object>)(((IProperty)nullableEnum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString)))))); + var entity4 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg4 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8? [], List<CompiledModelTestBase.Enum8?>, List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8? [][], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], List<CompiledModelTestBase.EnumU16?>, List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], List<CompiledModelTestBase.EnumU32?>, List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], List<CompiledModelTestBase.EnumU64?>, List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64? [][], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], List<CompiledModelTestBase.EnumU8?>, List<CompiledModelTestBase.EnumU8?>, float?>((((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8? [][])(((ValueComparer<object>)(((IProperty)nullableEnum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64? [][])(((ValueComparer<object>)(((IProperty)nullableEnumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))))))), (source.GetCurrentValue<float?>(nullableFloat) == null ? null : ((ValueComparer<float?>)(((IProperty)nullableFloat).GetValueComparer())).Snapshot(source.GetCurrentValue<float?>(nullableFloat)))))); + var entity5 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg5 = ((ISnapshot)(new Snapshot<float? [], Guid?, Guid? [], Guid? [][], IPAddress, IPAddress[], short?, short? [], int?, int? [], int? [][], long?, long? [], List<long? [][]>, sbyte?, sbyte? [], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], TimeOnly?, TimeOnly? [], TimeSpan?, TimeSpan? [], ushort?, ushort? [], uint?, uint? []>((((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))) == null ? null : ((float? [])(((ValueComparer<IEnumerable<float?>>)(((IProperty)nullableFloatArray).GetValueComparer())).Snapshot(((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))))))), (source.GetCurrentValue<Guid?>(nullableGuid) == null ? null : ((ValueComparer<Guid?>)(((IProperty)nullableGuid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid?>(nullableGuid))), (((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))) == null ? null : ((Guid? [])(((ValueComparer<IEnumerable<Guid?>>)(((IProperty)nullableGuidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))))))), (((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))) == null ? null : ((Guid? [][])(((ValueComparer<object>)(((IProperty)nullableGuidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))))))), (source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)nullableIPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)nullableIPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))))))), (source.GetCurrentValue<short?>(nullableInt16) == null ? null : ((ValueComparer<short?>)(((IProperty)nullableInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<short?>(nullableInt16))), (((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))) == null ? null : ((short? [])(((ValueComparer<IEnumerable<short?>>)(((IProperty)nullableInt16Array).GetValueComparer())).Snapshot(((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))))))), (source.GetCurrentValue<int?>(nullableInt32) == null ? null : ((ValueComparer<int?>)(((IProperty)nullableInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullableInt32))), (((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))) == null ? null : ((int? [])(((ValueComparer<IEnumerable<int?>>)(((IProperty)nullableInt32Array).GetValueComparer())).Snapshot(((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))))))), (((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))) == null ? null : ((int? [][])(((ValueComparer<object>)(((IProperty)nullableInt32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))))))), (source.GetCurrentValue<long?>(nullableInt64) == null ? null : ((ValueComparer<long?>)(((IProperty)nullableInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(nullableInt64))), (((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))) == null ? null : ((long? [])(((ValueComparer<IEnumerable<long?>>)(((IProperty)nullableInt64Array).GetValueComparer())).Snapshot(((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))))))), (((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))) == null ? null : ((List<long? [][]>)(((ValueComparer<object>)(((IProperty)nullableInt64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))))))), (source.GetCurrentValue<sbyte?>(nullableInt8) == null ? null : ((ValueComparer<sbyte?>)(((IProperty)nullableInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte?>(nullableInt8))), (((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))) == null ? null : ((sbyte? [])(((ValueComparer<IEnumerable<sbyte?>>)(((IProperty)nullableInt8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))))))), (source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)nullablePhysicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))))))), (((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))) == null ? null : ((IEnumerable<PhysicalAddress[][]>)(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))))))), (source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)(((IProperty)nullableString).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(nullableString))), (((object)(source.GetCurrentValue<string[]>(nullableStringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)nullableStringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(nullableStringArray))))))), (((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)nullableStringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))))))), (source.GetCurrentValue<TimeOnly?>(nullableTimeOnly) == null ? null : ((ValueComparer<TimeOnly?>)(((IProperty)nullableTimeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly?>(nullableTimeOnly))), (((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))) == null ? null : ((TimeOnly? [])(((ValueComparer<IEnumerable<TimeOnly?>>)(((IProperty)nullableTimeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))))))), (source.GetCurrentValue<TimeSpan?>(nullableTimeSpan) == null ? null : ((ValueComparer<TimeSpan?>)(((IProperty)nullableTimeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan?>(nullableTimeSpan))), (((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))) == null ? null : ((TimeSpan? [])(((ValueComparer<IEnumerable<TimeSpan?>>)(((IProperty)nullableTimeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))))))), (source.GetCurrentValue<ushort?>(nullableUInt16) == null ? null : ((ValueComparer<ushort?>)(((IProperty)nullableUInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort?>(nullableUInt16))), (((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))) == null ? null : ((ushort? [])(((ValueComparer<IEnumerable<ushort?>>)(((IProperty)nullableUInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))))))), (source.GetCurrentValue<uint?>(nullableUInt32) == null ? null : ((ValueComparer<uint?>)(((IProperty)nullableUInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint?>(nullableUInt32))), (((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array))) == null ? null : ((uint? [])(((ValueComparer<IEnumerable<uint?>>)(((IProperty)nullableUInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array)))))))))); + var entity6 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg6 = ((ISnapshot)(new Snapshot<ulong?, ulong? [], byte?, byte? [], byte? [][], 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<ulong?>(nullableUInt64) == null ? null : ((ValueComparer<ulong?>)(((IProperty)nullableUInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong?>(nullableUInt64))), (((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))) == null ? null : ((ulong? [])(((ValueComparer<IEnumerable<ulong?>>)(((IProperty)nullableUInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))))))), (source.GetCurrentValue<byte?>(nullableUInt8) == null ? null : ((ValueComparer<byte?>)(((IProperty)nullableUInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(nullableUInt8))), (((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))) == null ? null : ((byte? [])(((ValueComparer<IEnumerable<byte?>>)(((IProperty)nullableUInt8Array).GetValueComparer())).Snapshot(((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))))))), (((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))) == null ? null : ((byte? [][])(((ValueComparer<object>)(((IProperty)nullableUInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)(((IProperty)nullableUri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(nullableUri))), (((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)nullableUriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)physicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty))), (source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)(((IProperty)@string).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(@string))), (((object)(source.GetCurrentValue<string[]>(stringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)stringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(stringArray))))))), (((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)stringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))))))), (source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBoolConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty))), (source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty))), (source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToCharConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty))), (source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty))), (source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty))), (source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty))), (source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToEnumConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty))), (source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToGuidConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty))), (source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToIntNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty))), (source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeSpanConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty))), (source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToUriConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty))), ((ValueComparer<TimeOnly>)(((IProperty)timeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))) == null ? null : ((TimeOnly[])(((ValueComparer<IEnumerable<TimeOnly>>)(((IProperty)timeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray)))))))))); + var entity7 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, ((ISnapshot)(new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))) == null ? null : ((TimeSpan[])(((ValueComparer<IEnumerable<TimeSpan>>)(((IProperty)timeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))))))), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)(((IProperty)uInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))) == null ? null : ((ushort[])(((ValueComparer<IEnumerable<ushort>>)(((IProperty)uInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))))))), ((ValueComparer<uint>)(((IProperty)uInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint>(uInt32)), (((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))) == null ? null : ((uint[])(((ValueComparer<IEnumerable<uint>>)(((IProperty)uInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))))))), ((ValueComparer<ulong>)(((IProperty)uInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))) == null ? null : ((ulong[])(((ValueComparer<IEnumerable<ulong>>)(((IProperty)uInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))))))), ((ValueComparer<byte>)(((IProperty)uInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte>(uInt8)), (source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)(((IProperty)uInt8Array).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array))), (((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))) == null ? null : ((List<byte[]>)(((ValueComparer<object>)(((IProperty)uInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)(((IProperty)uri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uri))), (((object)(source.GetCurrentValue<Uri[]>(uriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)uriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(uriArray))))))), (source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)(((IProperty)uriToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty)))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(default(CompiledModelTestBase.ManyTypesId)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))); + var entity8 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 258, @@ -17752,779 +17493,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref CompiledModelTestBase.ManyTypesId UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] - public static extern ref bool[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] - public static extern ref bool[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] - public static extern ref char[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] - public static extern ref char[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] - public static extern ref DateOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] - public static extern ref decimal[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] - public static extern ref double[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32>[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] - public static extern ref float UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] - public static extern ref float[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] - public static extern ref Guid[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] - public static extern ref ICollection<Guid[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] - public static extern ref short UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] - public static extern ref short[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] - public static extern ref int[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] - public static extern ref int[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] - public static extern ref long[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] - public static extern ref IList<long[]>[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] - public static extern ref sbyte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] - public static extern ref sbyte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] - public static extern ref sbyte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] - public static extern ref bool? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] - public static extern ref bool?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] - public static extern ref char? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] - public static extern ref char?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] - public static extern ref DateOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] - public static extern ref DateOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] - public static extern ref DateTime? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] - public static extern ref DateTime?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] - public static extern ref decimal? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] - public static extern ref decimal?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] - public static extern ref double? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] - public static extern ref double?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] - public static extern ref float? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] - public static extern ref float?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] - public static extern ref Guid? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] - public static extern ref Guid?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] - public static extern ref Guid?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] - public static extern ref short? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] - public static extern ref short?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] - public static extern ref int?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] - public static extern ref int?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] - public static extern ref long?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] - public static extern ref List<long?[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] - public static extern ref sbyte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] - public static extern ref sbyte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] - public static extern ref IEnumerable<PhysicalAddress[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] - public static extern ref TimeOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] - public static extern ref TimeSpan? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] - public static extern ref TimeSpan?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] - public static extern ref ushort? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] - public static extern ref ushort?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] - public static extern ref uint? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] - public static extern ref uint?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] - public static extern ref ulong? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] - public static extern ref ulong?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] - public static extern ref byte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] - public static extern ref byte?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] - public static extern ref TimeSpan[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] - public static extern ref ushort UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] - public static extern ref ushort[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] - public static extern ref uint UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] - public static extern ref uint[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] - public static extern ref ulong UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] - public static extern ref ulong[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] - public static extern ref byte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] - public static extern ref List<byte[]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs new file mode 100644 index 00000000000..a7f933eb3fd --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs @@ -0,0 +1,790 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class ManyTypesUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref CompiledModelTestBase.ManyTypesId Id(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] + public static extern ref bool Bool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] + public static extern ref bool[] BoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] + public static extern ref bool[][] BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] + public static extern ref bool BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] + public static extern ref bool BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] + public static extern ref bool BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] + public static extern ref byte[] Bytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] + public static extern ref byte[][] BytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] + public static extern ref byte[] BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] + public static extern ref int CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] + public static extern ref char Char(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] + public static extern ref char[] CharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] + public static extern ref char[][] CharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] + public static extern ref char CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] + public static extern ref DateOnly DateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] + public static extern ref DateOnly[] DateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] + public static extern ref DateOnly DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] + public static extern ref DateTime DateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] + public static extern ref DateTime[] DateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] + public static extern ref decimal Decimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] + public static extern ref decimal[] DecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] + public static extern ref double Double(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] + public static extern ref double[] DoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32>[][] Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[][] Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[][] EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] + public static extern ref float Float(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] + public static extern ref float[] FloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] + public static extern ref Guid Guid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] + public static extern ref Guid[] GuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] + public static extern ref ICollection<Guid[][]> GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] + public static extern ref Guid GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] + public static extern ref Guid GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] + public static extern ref IPAddress IPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] + public static extern ref IPAddress[] IPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] + public static extern ref short Int16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] + public static extern ref short[] Int16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] + public static extern ref int Int32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] + public static extern ref int[] Int32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] + public static extern ref int[][] Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] + public static extern ref long Int64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] + public static extern ref long[] Int64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] + public static extern ref IList<long[]>[] Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] + public static extern ref sbyte Int8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] + public static extern ref sbyte[] Int8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] + public static extern ref sbyte[][][] Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] + public static extern ref int IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] + public static extern ref int IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] + public static extern ref int? NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] + public static extern ref bool? NullableBool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] + public static extern ref bool?[] NullableBoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] + public static extern ref byte[] NullableBytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] + public static extern ref byte[][] NullableBytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] + public static extern ref char? NullableChar(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] + public static extern ref char?[] NullableCharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] + public static extern ref DateOnly? NullableDateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] + public static extern ref DateOnly?[] NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] + public static extern ref DateTime? NullableDateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] + public static extern ref DateTime?[] NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] + public static extern ref decimal? NullableDecimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] + public static extern ref decimal?[] NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] + public static extern ref double? NullableDouble(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] + public static extern ref double?[] NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[][][] NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[][] NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[][] NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] + public static extern ref float? NullableFloat(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] + public static extern ref float?[] NullableFloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] + public static extern ref Guid? NullableGuid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] + public static extern ref Guid?[] NullableGuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] + public static extern ref Guid?[][] NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] + public static extern ref IPAddress NullableIPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] + public static extern ref IPAddress[] NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] + public static extern ref short? NullableInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] + public static extern ref short?[] NullableInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] + public static extern ref int? NullableInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] + public static extern ref int?[] NullableInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] + public static extern ref int?[][] NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] + public static extern ref long? NullableInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] + public static extern ref long?[] NullableInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] + public static extern ref List<long?[][]> NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] + public static extern ref sbyte? NullableInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] + public static extern ref sbyte?[] NullableInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] + public static extern ref IEnumerable<PhysicalAddress[][]> NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] + public static extern ref string NullableString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] + public static extern ref string[] NullableStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] + public static extern ref string[][] NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] + public static extern ref TimeOnly? NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly?[] NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] + public static extern ref TimeSpan? NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] + public static extern ref TimeSpan?[] NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] + public static extern ref ushort? NullableUInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] + public static extern ref ushort?[] NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] + public static extern ref uint? NullableUInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] + public static extern ref uint?[] NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] + public static extern ref ulong? NullableUInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] + public static extern ref ulong?[] NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] + public static extern ref byte? NullableUInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] + public static extern ref byte?[] NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] + public static extern ref byte?[][] NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] + public static extern ref Uri NullableUri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] + public static extern ref Uri[] NullableUriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] + public static extern ref string String(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] + public static extern ref string[] StringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] + public static extern ref string[][] StringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] + public static extern ref string StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] + public static extern ref string StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] + public static extern ref string StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] + public static extern ref string StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] + public static extern ref string StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] + public static extern ref string StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] + public static extern ref string StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] + public static extern ref string StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] + public static extern ref TimeOnly TimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly[] TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] + public static extern ref TimeSpan TimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] + public static extern ref TimeSpan[] TimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] + public static extern ref ushort UInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] + public static extern ref ushort[] UInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] + public static extern ref uint UInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] + public static extern ref uint[] UInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] + public static extern ref ulong UInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] + public static extern ref ulong[] UInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] + public static extern ref byte UInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] + public static extern ref byte[] UInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] + public static extern ref List<byte[]> UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] + public static extern ref Uri Uri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] + public static extern ref Uri[] UriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] + public static extern ref Uri UriToStringConverterProperty(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 44ca177bc48..2b3bdc28c74 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -42,11 +41,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalDerivedId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalDerivedId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -55,17 +54,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalDerivedId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalDerivedId)); principalDerivedId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -75,11 +74,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalDerivedAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalDerivedAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -88,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalDerivedAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalDerivedAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalDerivedAlternateId)); @@ -111,11 +110,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); id.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -124,17 +123,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -145,20 +144,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[3]); details.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -167,24 +166,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); details.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); details.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -193,20 +191,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<Number>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[4]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[4]); number.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -215,19 +213,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); number.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -236,20 +233,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeArray.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -258,17 +255,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -277,43 +274,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -322,20 +318,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeEnumerable.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -344,17 +340,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -366,24 +362,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -392,20 +387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeIList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -414,17 +409,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -436,24 +431,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -462,20 +456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -484,17 +478,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -503,43 +497,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -548,20 +541,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[9]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeArray.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -570,17 +563,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -592,19 +585,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -613,20 +605,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeEnumerable.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -635,17 +627,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -657,19 +649,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -678,20 +669,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeIList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -700,17 +691,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -722,19 +713,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -743,20 +733,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -765,17 +755,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -787,19 +777,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -836,19 +825,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); manyOwned.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance) == null); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) == null, + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance) == null); manyOwned.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), null); manyOwned.SetPropertyIndexes( index: 3, @@ -857,11 +846,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 5, storeGenerationIndex: -1); manyOwned.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), - () => (ICollection<CompiledModelTestBase.OwnedType>)(ICollection<CompiledModelTestBase.OwnedType>)new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), + ICollection<CompiledModelTestBase.OwnedType> () => ((ICollection<CompiledModelTestBase.OwnedType>)(((ICollection<CompiledModelTestBase.OwnedType>)(new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -884,24 +873,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, int>(source.ContainsKey("PrincipalDerivedId") ? (long)source["PrincipalDerivedId"] : 0L, source.ContainsKey("PrincipalDerivedAlternateId") ? (Guid)source["PrincipalDerivedAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, int>((source.ContainsKey("PrincipalDerivedId") ? ((long)(source["PrincipalDerivedId"])) : 0L), (source.ContainsKey("PrincipalDerivedAlternateId") ? ((Guid)(source["PrincipalDerivedAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 13, @@ -922,35 +911,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs index fa1a8c1fc4c..3a41a959ecc 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalBaseId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalBaseId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalBaseId)); var overrides = new StoreObjectDictionary<RuntimeRelationalPropertyOverrides>(); @@ -90,11 +89,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalBaseAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalBaseAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -103,17 +102,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalBaseAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalBaseAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalBaseAlternateId)); @@ -127,20 +126,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[2]); details.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -149,17 +148,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); details.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -176,7 +175,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas details.AddAnnotation("Relational:RelationalOverrides", overrides0); details.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -186,20 +184,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[3]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[3]); number.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -208,19 +206,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); number.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -230,20 +227,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[4]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[4]); refTypeArray.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -252,17 +249,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -271,43 +268,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -317,20 +313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeEnumerable.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -339,17 +335,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -361,24 +357,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -388,20 +383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeIList.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -410,17 +405,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -432,24 +427,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -459,20 +453,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -481,17 +475,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -500,43 +494,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -546,20 +539,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); valueTypeArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -568,17 +561,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -590,19 +583,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -612,20 +604,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeEnumerable.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -634,17 +626,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -656,19 +648,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -678,20 +669,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeIList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -700,17 +691,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -722,19 +713,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -744,20 +734,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -766,17 +756,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -788,19 +778,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -841,19 +830,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); owned.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); owned.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetAccessors( - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), null); owned.SetPropertyIndexes( index: 0, @@ -861,7 +850,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - owned.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return runtimeForeignKey; } @@ -896,24 +884,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid>(source.ContainsKey("PrincipalBaseId") ? (long)source["PrincipalBaseId"] : 0L, source.ContainsKey("PrincipalBaseAlternateId") ? (Guid)source["PrincipalBaseAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"))); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid>((source.ContainsKey("PrincipalBaseId") ? ((long)(source["PrincipalBaseId"])) : 0L), (source.ContainsKey("PrincipalBaseAlternateId") ? ((Guid)(source["PrincipalBaseAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 12, @@ -941,35 +929,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..ed8d21e397c --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,45 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable<string> _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList<string> _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List<IPAddress> _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable<byte> _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List<short> _valueTypeList(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs index 36345d1545e..f00bbf77e3e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -46,20 +45,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(0) && !(PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue<long?>(0) : PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -68,17 +67,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); @@ -93,7 +92,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas id.AddAnnotation("Relational:RelationalOverrides", overrides); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var alternateId = runtimeEntityType.AddProperty( "AlternateId", @@ -104,20 +102,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas sentinel: new Guid("00000000-0000-0000-0000-000000000000"), jsonValueReaderWriter: JsonGuidReaderWriter.Instance); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, + bool (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId)), + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); alternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -126,17 +124,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); alternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); alternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(alternateId)); @@ -148,20 +146,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum1.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -170,28 +168,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); enum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -200,20 +197,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum2.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -222,29 +219,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); enum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -252,20 +248,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum1.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -274,28 +270,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); flagsEnum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -304,20 +299,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), propertyAccessMode: PropertyAccessMode.Property); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum2.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -326,28 +321,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(6); flagsEnum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2", "TestNamespace"), ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -356,20 +350,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 6), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeArray.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -378,17 +372,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -397,43 +391,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -442,20 +435,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 7), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeEnumerable.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -464,17 +457,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -486,24 +479,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -512,20 +504,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 8), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeIList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -534,17 +526,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -556,24 +548,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -582,20 +573,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 9), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -604,17 +595,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -623,43 +614,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -668,20 +658,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[10]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 10), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeArray.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -690,17 +680,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -712,19 +702,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -733,20 +722,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 11), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeEnumerable.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -755,17 +744,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -777,19 +766,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -798,20 +786,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 12), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeIList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -820,17 +808,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -842,19 +830,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -863,20 +850,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 13), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -885,17 +872,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -907,19 +894,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -958,19 +944,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 1, @@ -979,12 +965,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 3, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -1012,24 +997,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key0)); var owned = runtimeEntityType.FindNavigation("Owned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Guid>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, Guid>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Guid>(default(Nullable<long>), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, Guid>(default(long? ), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 14, @@ -1051,53 +1036,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] - public static extern CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] - public static extern void UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs index df9543d726c..a8786862ae2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs @@ -41,16 +41,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); derivedsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -59,26 +59,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null) == null) { return entry.ReadTemporaryValue<long>(0); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); derivedsId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -87,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); derivedsId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); derivedsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(derivedsId)); derivedsId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -107,16 +107,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); derivedsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(1)) { @@ -125,26 +125,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(1); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); derivedsAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -153,17 +153,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); derivedsAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); derivedsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(derivedsAlternateId)); @@ -175,16 +175,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); principalsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(2)) { @@ -193,26 +193,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null) == null) + if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null) == null) { return entry.ReadTemporaryValue<long>(2); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); principalsId.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -221,17 +221,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); principalsId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalsId)); principalsId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -241,16 +241,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); principalsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(3)) { @@ -259,26 +259,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(3); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), - (ValueBuffer valueBuffer) => valueBuffer[3]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), + object (ValueBuffer valueBuffer) => valueBuffer[3]); principalsAlternateId.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -287,17 +287,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 3); principalsAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalsAlternateId)); @@ -313,20 +313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); rowid.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); + byte[] (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, + byte[] (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); rowid.SetSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetMaterializationSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), - (ValueBuffer valueBuffer) => valueBuffer[4]); + byte[] (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : (entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))))), + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), + object (ValueBuffer valueBuffer) => valueBuffer[4]); rowid.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -335,17 +335,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 4); rowid.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(v1, v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(v), - (byte[] v) => v.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(v1, v2), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(v), + byte[] (byte[] v) => v.ToArray()), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "rowversion", size: 8), @@ -395,24 +395,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(rowid))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), (source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(rowid)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(default(Guid)), default(byte[]) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(default(byte[])))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(byte[]) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(default(byte[]))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)((IProperty)derivedsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)(((IProperty)derivedsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 5, diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..4b43c6dd1f6 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,63 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] + public static extern CompiledModelTestBase.AFlagsEnum Get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] + public static extern void Set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs index 8b887e27f2f..d00ec1f753c 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -70,19 +69,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 4, @@ -91,12 +90,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 6, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -120,24 +118,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var dependent = runtimeEntityType.FindNavigation("Dependent")!; var manyOwned = runtimeEntityType.FindNavigation("ManyOwned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Guid>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, Guid>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Guid>(default(Nullable<long>), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, Guid>(default(long? ), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object, object, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null, UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity8)), null); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object, object, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null, PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity8)), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 14, @@ -158,14 +156,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<byte?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] - public static extern ref ICollection<CompiledModelTestBase.OwnedType> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..924e4c82620 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,23 @@ +// <auto-generated /> +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] + public static extern ref ICollection<CompiledModelTestBase.OwnedType> ManyOwned(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Principals(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs index f057e7ef992..92f584448c3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); principalId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -78,11 +77,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -91,17 +90,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalAlternateId)); @@ -113,11 +112,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); enumDiscriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enumDiscriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -126,25 +125,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumDiscriminator.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value), + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum1, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value))); + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))))); enumDiscriminator.SetSentinelFromProviderValue(0); enumDiscriminator.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -155,20 +154,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + byte? (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => !(DependentBaseUnsafeAccessors<byte?>.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => !(DependentBaseUnsafeAccessors<byte?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(id, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(id), - (ValueBuffer valueBuffer) => valueBuffer[3]); + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(id, 3), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(id), + object (ValueBuffer valueBuffer) => valueBuffer[3]); id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -177,21 +176,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); id.SetValueComparer(new NullableValueComparer<byte>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<byte>(id.TypeMapping.KeyComparer)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { principalId, principalAlternateId }); @@ -233,19 +231,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -253,7 +251,6 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -264,19 +261,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt lazyLoadingEnabled: false); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<byte>>>(dependent), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<byte?>>(dependent), null); dependent.SetPropertyIndexes( index: 2, @@ -298,24 +295,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id))); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 4, @@ -338,11 +335,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<byte?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<byte?> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs index a9a85f6f7c7..acd8b9d1f75 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 20, unicode: false); data.SetGetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[4]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[4]); data.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -61,17 +60,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "char(20)", size: 20, @@ -79,7 +78,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dbType: System.Data.DbType.AnsiStringFixedLength)); data.AddAnnotation("Relational:IsFixedLength", true); data.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var money = runtimeEntityType.AddProperty( "Money", @@ -88,11 +86,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas scale: 3, sentinel: 0m); money.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), - (ValueBuffer valueBuffer) => valueBuffer[5]); + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), + object (ValueBuffer valueBuffer) => valueBuffer[5]); money.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -101,17 +99,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); money.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(9,3)", precision: 9, @@ -131,24 +129,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var money = runtimeEntityType.FindProperty("Money")!; var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>, string, decimal>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data)), ((ValueComparer<decimal>)((IProperty)money).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(money))); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?, string, decimal>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data))), ((ValueComparer<decimal>)(((IProperty)money).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(money))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default, source.ContainsKey("Money") ? (decimal)source["Money"] : 0M)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("Money") ? ((decimal)(source["Money"])) : 0M))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity8)); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity8)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 6, @@ -169,8 +167,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<byte?> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} 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 0b1bdc09403..70a977c333a 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 @@ -7,7 +7,6 @@ using System.Net; using System.Net.NetworkInformation; using System.Reflection; -using System.Runtime.CompilerServices; using System.Text; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -47,20 +46,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueConverter: new CompiledModelTestBase.ManyTypesIdConverter()); id.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); id.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : (entry.FlaggedAsTemporary(0) && ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -69,29 +68,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)), + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.ManyTypesId, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)))); + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)))); id.SetCurrentValueComparer(new CurrentProviderValueComparer<CompiledModelTestBase.ManyTypesId, int>(id)); id.SetSentinelFromProviderValue(0); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id", "TestNamespace") }); var @bool = runtimeEntityType.AddProperty( "Bool", @@ -100,20 +98,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); @bool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance) == false); @bool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), - (ValueBuffer valueBuffer) => valueBuffer[1]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), + object (ValueBuffer valueBuffer) => valueBuffer[1]); @bool.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -122,19 +120,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @bool.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)); @bool.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @bool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool", "TestNamespace") }); var boolArray = runtimeEntityType.AddProperty( "BoolArray", @@ -142,20 +139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance) == null); + bool[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity) == null, + bool[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance) == null); boolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), - (ValueBuffer valueBuffer) => valueBuffer[2]); + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), + bool[] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), + object (ValueBuffer valueBuffer) => valueBuffer[2]); boolArray.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -164,17 +161,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -186,19 +183,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))); boolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray", "TestNamespace") }); var boolNestedCollection = runtimeEntityType.AddProperty( "BoolNestedCollection", @@ -206,20 +202,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance) == null); + bool[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) == null, + bool[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance) == null); boolNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[3]); + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), + bool[][] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[3]); boolNestedCollection.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -228,17 +224,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -252,17 +248,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -274,19 +270,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)))); boolNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection", "TestNamespace") }); var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", @@ -294,20 +289,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance) == false); boolToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -316,33 +311,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]), + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, string>( JsonStringReaderWriter.Instance, new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]))); + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))))); boolToStringConverterProperty.SetSentinelFromProviderValue("A"); boolToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty", "TestNamespace") }); var boolToTwoValuesConverterProperty = runtimeEntityType.AddProperty( "BoolToTwoValuesConverterProperty", @@ -350,20 +344,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToTwoValuesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToTwoValuesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToTwoValuesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance) == false); boolToTwoValuesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -372,28 +366,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToTwoValuesConverterProperty.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1), + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, byte>( JsonByteReaderWriter.Instance, new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1))); + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1))); boolToTwoValuesConverterProperty.SetSentinelFromProviderValue((byte)0); boolToTwoValuesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToTwoValuesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty", "TestNamespace") }); var boolToZeroOneConverterProperty = runtimeEntityType.AddProperty( "BoolToZeroOneConverterProperty", @@ -402,20 +395,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToZeroOneConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new BoolToZeroOneConverter<short>()); boolToZeroOneConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance) == false); boolToZeroOneConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[6]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -424,28 +417,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToZeroOneConverterProperty.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1), + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1))); + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1))); boolToZeroOneConverterProperty.SetSentinelFromProviderValue((short)0); boolToZeroOneConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - boolToZeroOneConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty", "TestNamespace") }); var bytes = runtimeEntityType.AddProperty( "Bytes", @@ -453,20 +445,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance) == null); bytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), - (ValueBuffer valueBuffer) => valueBuffer[7]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), + object (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -475,22 +467,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytes.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); bytes.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes", "TestNamespace") }); var bytesArray = runtimeEntityType.AddProperty( "BytesArray", @@ -498,20 +489,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance) == null); bytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -520,17 +511,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -542,22 +533,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); bytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray", "TestNamespace") }); var bytesNestedCollection = runtimeEntityType.AddProperty( "BytesNestedCollection", @@ -565,20 +555,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance) == null); bytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[9]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[9]); bytesNestedCollection.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -587,17 +577,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -611,17 +601,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -633,22 +623,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None))); bytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection", "TestNamespace") }); var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", @@ -658,20 +647,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueConverter: new BytesToStringConverter(), valueComparer: new ArrayStructuralComparer<byte>()); bytesToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance) == null); bytesToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[10]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -680,32 +669,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)), + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<byte[], string>( JsonStringReaderWriter.Instance, new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)))); + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); bytesToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - bytesToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty", "TestNamespace") }); var castingConverterProperty = runtimeEntityType.AddProperty( "CastingConverterProperty", @@ -714,20 +702,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CastingConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CastingConverter<int, decimal>()); castingConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance) == 0); castingConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[11]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -736,28 +724,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); castingConverterProperty.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), converter: new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v), + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v))); + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))))); castingConverterProperty.SetSentinelFromProviderValue(0m); castingConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - castingConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty", "TestNamespace") }); var @char = runtimeEntityType.AddProperty( "Char", @@ -765,20 +752,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Char", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Char>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @char.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance) == '\0'); @char.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), - (ValueBuffer valueBuffer) => valueBuffer[12]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), + object (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -787,33 +774,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @char.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); @char.SetSentinelFromProviderValue("\0"); @char.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @char.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char", "TestNamespace") }); var charArray = runtimeEntityType.AddProperty( "CharArray", @@ -821,20 +807,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance) == null); + char[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity) == null, + char[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance) == null); charArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), - (ValueBuffer valueBuffer) => valueBuffer[13]); + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), + char[] (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), + object (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -843,17 +829,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -862,43 +848,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))); charArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray", "TestNamespace") }); var charNestedCollection = runtimeEntityType.AddProperty( "CharNestedCollection", @@ -906,20 +891,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance) == null); + char[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) == null, + char[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance) == null); charNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[14]); + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), + char[][] (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[14]); charNestedCollection.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -928,17 +913,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -948,29 +933,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<char[][], char[]>( new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -979,43 +964,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))))); charNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection", "TestNamespace") }); var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", @@ -1024,20 +1008,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CharToStringConverter()); charToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance) == '\0'); charToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -1046,17 +1030,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nchar(1)", size: 1, @@ -1064,17 +1048,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fixedLength: true, dbType: System.Data.DbType.StringFixedLength), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); charToStringConverterProperty.SetSentinelFromProviderValue("\0"); charToStringConverterProperty.AddAnnotation("Relational:IsFixedLength", true); charToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - charToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty", "TestNamespace") }); var dateOnly = runtimeEntityType.AddProperty( "DateOnly", @@ -1083,20 +1066,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateOnly(1, 1, 1)); dateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance) == default(DateOnly)); dateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[16]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -1105,19 +1088,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnly.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)); dateOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly", "TestNamespace") }); var dateOnlyArray = runtimeEntityType.AddProperty( "DateOnlyArray", @@ -1125,20 +1107,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance) == null); + DateOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) == null, + DateOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance) == null); dateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), + DateOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1147,17 +1129,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), keyComparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1169,19 +1151,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))); dateOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray", "TestNamespace") }); var dateOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "DateOnlyToStringConverterProperty", @@ -1190,20 +1171,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateOnlyToStringConverter()); dateOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance) == default(DateOnly)); dateOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1212,33 +1193,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(10)", size: 10, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); dateOnlyToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01"); dateOnlyToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty", "TestNamespace") }); var dateTime = runtimeEntityType.AddProperty( "DateTime", @@ -1247,20 +1227,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance) == default(DateTime)); dateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[19]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), + object (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1269,19 +1249,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTime.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); dateTime.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime", "TestNamespace") }); var dateTimeArray = runtimeEntityType.AddProperty( "DateTimeArray", @@ -1289,20 +1268,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance) == null); + DateTime[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity) == null, + DateTime[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance) == null); dateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[20]); + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1311,17 +1290,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1333,19 +1312,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); dateTimeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray", "TestNamespace") }); var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBinaryConverterProperty", @@ -1354,20 +1332,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBinaryConverter()); dateTimeOffsetToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1376,28 +1354,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBinaryConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); dateTimeOffsetToBinaryConverterProperty.SetSentinelFromProviderValue(0L); dateTimeOffsetToBinaryConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty", "TestNamespace") }); var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBytesConverterProperty", @@ -1406,20 +1383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBytesConverter()); dateTimeOffsetToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1428,31 +1405,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(12)", size: 12), converter: new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); dateTimeOffsetToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); dateTimeOffsetToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty", "TestNamespace") }); var dateTimeOffsetToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToStringConverterProperty", @@ -1461,20 +1437,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToStringConverter()); dateTimeOffsetToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1483,33 +1459,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); dateTimeOffsetToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00+00:00"); dateTimeOffsetToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeOffsetToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty", "TestNamespace") }); var dateTimeToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeToBinaryConverterProperty", @@ -1518,20 +1493,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToBinaryConverter()); dateTimeToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance) == default(DateTime)); dateTimeToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[24]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1540,28 +1515,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToBinaryConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)), + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)))); + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)))); dateTimeToBinaryConverterProperty.SetSentinelFromProviderValue(0L); dateTimeToBinaryConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty", "TestNamespace") }); var dateTimeToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeToStringConverterProperty", @@ -1570,20 +1544,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToStringConverter()); dateTimeToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance) == default(DateTime)); dateTimeToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[25]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1592,33 +1566,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); dateTimeToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00"); dateTimeToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty", "TestNamespace") }); var dateTimeToTicksConverterProperty = runtimeEntityType.AddProperty( "DateTimeToTicksConverterProperty", @@ -1627,20 +1600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTimeToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance) == default(DateTime)); dateTimeToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1649,19 +1622,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToTicksConverterProperty.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); dateTimeToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - dateTimeToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty", "TestNamespace") }); var @decimal = runtimeEntityType.AddProperty( "Decimal", @@ -1670,20 +1642,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Decimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0m); @decimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance) == 0M); @decimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[27]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), + object (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1692,19 +1664,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @decimal.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)); @decimal.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @decimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal", "TestNamespace") }); var decimalArray = runtimeEntityType.AddProperty( "DecimalArray", @@ -1712,20 +1683,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); decimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance) == null); + decimal[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity) == null, + decimal[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance) == null); decimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[28]); + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), + decimal[] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -1734,17 +1705,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), keyComparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1756,19 +1727,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))); decimalArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray", "TestNamespace") }); var decimalNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToBytesConverterProperty", @@ -1777,20 +1747,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<decimal>()); decimalNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance) == 0M); decimalNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[29]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -1799,31 +1769,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)), + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)))); + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))))); decimalNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); decimalNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty", "TestNamespace") }); var decimalNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToStringConverterProperty", @@ -1832,20 +1801,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<decimal>()); decimalNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance) == 0M); decimalNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -1854,33 +1823,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, string>( JsonStringReaderWriter.Instance, new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); decimalNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); decimalNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - decimalNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty", "TestNamespace") }); var @double = runtimeEntityType.AddProperty( "Double", @@ -1889,20 +1857,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Double>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0.0); @double.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance).Equals(0D)); @double.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), - (ValueBuffer valueBuffer) => valueBuffer[31]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), + object (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -1911,19 +1879,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @double.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)); @double.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @double.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double", "TestNamespace") }); var doubleArray = runtimeEntityType.AddProperty( "DoubleArray", @@ -1931,20 +1898,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); doubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance) == null); + double[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity) == null, + double[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance) == null); doubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[32]); + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), + double[] (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -1953,17 +1920,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), keyComparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1975,19 +1942,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))); doubleArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray", "TestNamespace") }); var doubleNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToBytesConverterProperty", @@ -1996,20 +1962,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<double>()); doubleNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance).Equals(0D)); doubleNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[33]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -2018,31 +1984,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(8)", size: 8), converter: new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)), + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)))); + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))))); doubleNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }); doubleNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty", "TestNamespace") }); var doubleNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToStringConverterProperty", @@ -2051,20 +2016,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<double>()); doubleNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance).Equals(0D)); doubleNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[34]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -2073,33 +2038,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, string>( JsonStringReaderWriter.Instance, new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); doubleNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); doubleNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - doubleNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty", "TestNamespace") }); var enum16 = runtimeEntityType.AddProperty( "Enum16", @@ -2107,20 +2071,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), - (ValueBuffer valueBuffer) => valueBuffer[35]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), + object (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -2129,28 +2093,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); enum16.SetSentinelFromProviderValue((short)0); enum16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16", "TestNamespace") }); var enum16Array = runtimeEntityType.AddProperty( "Enum16Array", @@ -2158,20 +2121,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance) == null); enum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[36]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -2180,17 +2143,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2199,38 +2162,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); enum16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array", "TestNamespace") }); var enum16AsString = runtimeEntityType.AddProperty( "Enum16AsString", @@ -2239,20 +2201,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[37]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -2261,33 +2223,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); enum16AsString.SetSentinelFromProviderValue("Default"); enum16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString", "TestNamespace") }); var enum16AsStringArray = runtimeEntityType.AddProperty( "Enum16AsStringArray", @@ -2295,20 +2256,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance) == null); enum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[38]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2317,17 +2278,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2336,43 +2297,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); enum16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray", "TestNamespace") }); var enum16AsStringCollection = runtimeEntityType.AddProperty( "Enum16AsStringCollection", @@ -2380,20 +2340,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance) == null); enum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[39]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( index: 39, originalValueIndex: 39, @@ -2402,17 +2362,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2421,43 +2381,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); enum16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection", "TestNamespace") }); var enum16Collection = runtimeEntityType.AddProperty( "Enum16Collection", @@ -2465,20 +2424,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance) == null); enum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[40]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( index: 40, originalValueIndex: 40, @@ -2487,17 +2446,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2506,38 +2465,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); enum16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection", "TestNamespace") }); var enum32 = runtimeEntityType.AddProperty( "Enum32", @@ -2545,20 +2503,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), - (ValueBuffer valueBuffer) => valueBuffer[41]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), + object (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( index: 41, originalValueIndex: 41, @@ -2567,28 +2525,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enum32.SetSentinelFromProviderValue(0); enum32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32", "TestNamespace") }); var enum32Array = runtimeEntityType.AddProperty( "Enum32Array", @@ -2596,20 +2553,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance) == null); enum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[42]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( index: 42, originalValueIndex: 42, @@ -2618,17 +2575,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2637,38 +2594,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); enum32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array", "TestNamespace") }); var enum32AsString = runtimeEntityType.AddProperty( "Enum32AsString", @@ -2677,20 +2633,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[43]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( index: 43, originalValueIndex: 43, @@ -2699,33 +2655,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enum32AsString.SetSentinelFromProviderValue("Default"); enum32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString", "TestNamespace") }); var enum32AsStringArray = runtimeEntityType.AddProperty( "Enum32AsStringArray", @@ -2733,20 +2688,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance) == null); enum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[44]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( index: 44, originalValueIndex: 44, @@ -2755,17 +2710,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2774,43 +2729,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); enum32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray", "TestNamespace") }); var enum32AsStringCollection = runtimeEntityType.AddProperty( "Enum32AsStringCollection", @@ -2818,20 +2772,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance) == null); enum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[45]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( index: 45, originalValueIndex: 45, @@ -2840,17 +2794,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2859,43 +2813,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); enum32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection", "TestNamespace") }); var enum32Collection = runtimeEntityType.AddProperty( "Enum32Collection", @@ -2903,20 +2856,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance) == null); enum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[46]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( index: 46, originalValueIndex: 46, @@ -2925,17 +2878,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2944,38 +2897,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); enum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection", "TestNamespace") }); var enum32NestedCollection = runtimeEntityType.AddProperty( "Enum32NestedCollection", @@ -2983,20 +2935,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance) == null); + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) == null, + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance) == null); enum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[47]); + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[47]); enum32NestedCollection.SetPropertyIndexes( index: 47, originalValueIndex: 47, @@ -3005,17 +2957,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3026,8 +2978,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( @@ -3035,21 +2987,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3059,29 +3011,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3090,38 +3042,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); enum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection", "TestNamespace") }); var enum64 = runtimeEntityType.AddProperty( "Enum64", @@ -3129,20 +3080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), - (ValueBuffer valueBuffer) => valueBuffer[48]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), + object (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( index: 48, originalValueIndex: 48, @@ -3151,28 +3102,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); enum64.SetSentinelFromProviderValue(0L); enum64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64", "TestNamespace") }); var enum64Array = runtimeEntityType.AddProperty( "Enum64Array", @@ -3180,20 +3130,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance) == null); enum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[49]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( index: 49, originalValueIndex: 49, @@ -3202,17 +3152,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3221,38 +3171,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); enum64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array", "TestNamespace") }); var enum64AsString = runtimeEntityType.AddProperty( "Enum64AsString", @@ -3261,20 +3210,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[50]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( index: 50, originalValueIndex: 50, @@ -3283,33 +3232,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); enum64AsString.SetSentinelFromProviderValue("Default"); enum64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString", "TestNamespace") }); var enum64AsStringArray = runtimeEntityType.AddProperty( "Enum64AsStringArray", @@ -3317,20 +3265,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance) == null); enum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[51]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( index: 51, originalValueIndex: 51, @@ -3339,17 +3287,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3358,43 +3306,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); enum64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray", "TestNamespace") }); var enum64AsStringCollection = runtimeEntityType.AddProperty( "Enum64AsStringCollection", @@ -3402,20 +3349,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance) == null); enum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[52]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( index: 52, originalValueIndex: 52, @@ -3424,17 +3371,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3443,43 +3390,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); enum64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection", "TestNamespace") }); var enum64Collection = runtimeEntityType.AddProperty( "Enum64Collection", @@ -3487,20 +3433,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance) == null); enum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[53]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( index: 53, originalValueIndex: 53, @@ -3509,17 +3455,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3528,38 +3474,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); enum64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection", "TestNamespace") }); var enum8 = runtimeEntityType.AddProperty( "Enum8", @@ -3567,20 +3512,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), - (ValueBuffer valueBuffer) => valueBuffer[54]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), + object (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( index: 54, originalValueIndex: 54, @@ -3589,28 +3534,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); enum8.SetSentinelFromProviderValue((short)0); enum8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8", "TestNamespace") }); var enum8Array = runtimeEntityType.AddProperty( "Enum8Array", @@ -3618,20 +3562,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance) == null); enum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[55]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( index: 55, originalValueIndex: 55, @@ -3640,17 +3584,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3659,38 +3603,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); enum8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array", "TestNamespace") }); var enum8AsString = runtimeEntityType.AddProperty( "Enum8AsString", @@ -3699,20 +3642,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[56]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( index: 56, originalValueIndex: 56, @@ -3721,33 +3664,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); enum8AsString.SetSentinelFromProviderValue("Default"); enum8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString", "TestNamespace") }); var enum8AsStringArray = runtimeEntityType.AddProperty( "Enum8AsStringArray", @@ -3755,20 +3697,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance) == null); enum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[57]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( index: 57, originalValueIndex: 57, @@ -3777,17 +3719,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3796,43 +3738,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); enum8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray", "TestNamespace") }); var enum8AsStringCollection = runtimeEntityType.AddProperty( "Enum8AsStringCollection", @@ -3840,20 +3781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance) == null); enum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[58]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( index: 58, originalValueIndex: 58, @@ -3862,17 +3803,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3881,43 +3822,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); enum8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection", "TestNamespace") }); var enum8Collection = runtimeEntityType.AddProperty( "Enum8Collection", @@ -3925,20 +3865,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance) == null); enum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[59]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( index: 59, originalValueIndex: 59, @@ -3947,17 +3887,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -3966,38 +3906,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); enum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection", "TestNamespace") }); var enum8NestedCollection = runtimeEntityType.AddProperty( "Enum8NestedCollection", @@ -4005,20 +3944,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance) == null); enum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[60]); + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[60]); enum8NestedCollection.SetPropertyIndexes( index: 60, originalValueIndex: 60, @@ -4027,17 +3966,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4047,29 +3986,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4078,38 +4017,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))); enum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection", "TestNamespace") }); var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", @@ -4118,20 +4056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToNumberConverter<CompiledModelTestBase.Enum32, int>()); enumToNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[61]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( index: 61, originalValueIndex: 61, @@ -4140,28 +4078,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enumToNumberConverterProperty.SetSentinelFromProviderValue(0); enumToNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumToNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty", "TestNamespace") }); var enumToStringConverterProperty = runtimeEntityType.AddProperty( "EnumToStringConverterProperty", @@ -4170,20 +4107,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToStringConverter<CompiledModelTestBase.Enum32>()); enumToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[62]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( index: 62, originalValueIndex: 62, @@ -4192,33 +4129,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enumToStringConverterProperty.SetSentinelFromProviderValue("Default"); enumToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty", "TestNamespace") }); var enumU16 = runtimeEntityType.AddProperty( "EnumU16", @@ -4226,20 +4162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[63]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), + object (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( index: 63, originalValueIndex: 63, @@ -4248,28 +4184,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); enumU16.SetSentinelFromProviderValue(0); enumU16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16", "TestNamespace") }); var enumU16Array = runtimeEntityType.AddProperty( "EnumU16Array", @@ -4277,20 +4212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance) == null); enumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[64]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( index: 64, originalValueIndex: 64, @@ -4299,17 +4234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4318,38 +4253,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); enumU16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array", "TestNamespace") }); var enumU16AsString = runtimeEntityType.AddProperty( "EnumU16AsString", @@ -4358,20 +4292,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[65]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( index: 65, originalValueIndex: 65, @@ -4380,33 +4314,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); enumU16AsString.SetSentinelFromProviderValue("Min"); enumU16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString", "TestNamespace") }); var enumU16AsStringArray = runtimeEntityType.AddProperty( "EnumU16AsStringArray", @@ -4414,20 +4347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance) == null); enumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[66]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( index: 66, originalValueIndex: 66, @@ -4436,17 +4369,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4455,43 +4388,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); enumU16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray", "TestNamespace") }); var enumU16AsStringCollection = runtimeEntityType.AddProperty( "EnumU16AsStringCollection", @@ -4499,20 +4431,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance) == null); enumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[67]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( index: 67, originalValueIndex: 67, @@ -4521,17 +4453,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4540,43 +4472,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); enumU16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection", "TestNamespace") }); var enumU16Collection = runtimeEntityType.AddProperty( "EnumU16Collection", @@ -4584,20 +4515,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance) == null); enumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( index: 68, originalValueIndex: 68, @@ -4606,17 +4537,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4625,38 +4556,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); enumU16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection", "TestNamespace") }); var enumU32 = runtimeEntityType.AddProperty( "EnumU32", @@ -4664,20 +4594,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[69]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), + object (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( index: 69, originalValueIndex: 69, @@ -4686,28 +4616,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); enumU32.SetSentinelFromProviderValue(0L); enumU32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32", "TestNamespace") }); var enumU32Array = runtimeEntityType.AddProperty( "EnumU32Array", @@ -4715,20 +4644,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance) == null); enumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[70]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( index: 70, originalValueIndex: 70, @@ -4737,17 +4666,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4756,38 +4685,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); enumU32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array", "TestNamespace") }); var enumU32AsString = runtimeEntityType.AddProperty( "EnumU32AsString", @@ -4796,20 +4724,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[71]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( index: 71, originalValueIndex: 71, @@ -4818,33 +4746,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); enumU32AsString.SetSentinelFromProviderValue("Min"); enumU32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString", "TestNamespace") }); var enumU32AsStringArray = runtimeEntityType.AddProperty( "EnumU32AsStringArray", @@ -4852,20 +4779,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance) == null); enumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[72]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( index: 72, originalValueIndex: 72, @@ -4874,17 +4801,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4893,43 +4820,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); enumU32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray", "TestNamespace") }); var enumU32AsStringCollection = runtimeEntityType.AddProperty( "EnumU32AsStringCollection", @@ -4937,20 +4863,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance) == null); enumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[73]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( index: 73, originalValueIndex: 73, @@ -4959,17 +4885,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -4978,43 +4904,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); enumU32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection", "TestNamespace") }); var enumU32Collection = runtimeEntityType.AddProperty( "EnumU32Collection", @@ -5022,20 +4947,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance) == null); enumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( index: 74, originalValueIndex: 74, @@ -5044,17 +4969,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5063,38 +4988,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); enumU32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection", "TestNamespace") }); var enumU64 = runtimeEntityType.AddProperty( "EnumU64", @@ -5102,20 +5026,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[75]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), + object (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( index: 75, originalValueIndex: 75, @@ -5124,32 +5048,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); enumU64.SetSentinelFromProviderValue(0m); enumU64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64", "TestNamespace") }); var enumU64Array = runtimeEntityType.AddProperty( "EnumU64Array", @@ -5157,20 +5080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance) == null); enumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[76]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( index: 76, originalValueIndex: 76, @@ -5179,17 +5102,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5198,42 +5121,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); enumU64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array", "TestNamespace") }); var enumU64AsString = runtimeEntityType.AddProperty( "EnumU64AsString", @@ -5242,20 +5164,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[77]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( index: 77, originalValueIndex: 77, @@ -5264,33 +5186,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); enumU64AsString.SetSentinelFromProviderValue("Min"); enumU64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString", "TestNamespace") }); var enumU64AsStringArray = runtimeEntityType.AddProperty( "EnumU64AsStringArray", @@ -5298,20 +5219,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance) == null); enumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[78]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( index: 78, originalValueIndex: 78, @@ -5320,17 +5241,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5339,43 +5260,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); enumU64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray", "TestNamespace") }); var enumU64AsStringCollection = runtimeEntityType.AddProperty( "EnumU64AsStringCollection", @@ -5383,20 +5303,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance) == null); enumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[79]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( index: 79, originalValueIndex: 79, @@ -5405,17 +5325,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5424,43 +5344,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); enumU64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection", "TestNamespace") }); var enumU64Collection = runtimeEntityType.AddProperty( "EnumU64Collection", @@ -5468,20 +5387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance) == null); enumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( index: 80, originalValueIndex: 80, @@ -5490,17 +5409,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5509,42 +5428,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); enumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection", "TestNamespace") }); var enumU64NestedCollection = runtimeEntityType.AddProperty( "EnumU64NestedCollection", @@ -5552,20 +5470,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance) == null); enumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[81]); enumU64NestedCollection.SetPropertyIndexes( index: 81, originalValueIndex: 81, @@ -5574,17 +5492,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5594,29 +5512,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5625,42 +5543,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))); enumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection", "TestNamespace") }); var enumU8 = runtimeEntityType.AddProperty( "EnumU8", @@ -5668,20 +5585,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[82]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), + object (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( index: 82, originalValueIndex: 82, @@ -5690,28 +5607,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); enumU8.SetSentinelFromProviderValue((byte)0); enumU8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8", "TestNamespace") }); var enumU8Array = runtimeEntityType.AddProperty( "EnumU8Array", @@ -5719,20 +5635,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance) == null); enumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[83]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( index: 83, originalValueIndex: 83, @@ -5741,17 +5657,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5760,38 +5676,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); enumU8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array", "TestNamespace") }); var enumU8AsString = runtimeEntityType.AddProperty( "EnumU8AsString", @@ -5800,20 +5715,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[84]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( index: 84, originalValueIndex: 84, @@ -5822,33 +5737,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); enumU8AsString.SetSentinelFromProviderValue("Min"); enumU8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString", "TestNamespace") }); var enumU8AsStringArray = runtimeEntityType.AddProperty( "EnumU8AsStringArray", @@ -5856,20 +5770,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance) == null); enumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( index: 85, originalValueIndex: 85, @@ -5878,17 +5792,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5897,43 +5811,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); enumU8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray", "TestNamespace") }); var enumU8AsStringCollection = runtimeEntityType.AddProperty( "EnumU8AsStringCollection", @@ -5941,20 +5854,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance) == null); enumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[86]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( index: 86, originalValueIndex: 86, @@ -5963,17 +5876,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -5982,43 +5895,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); enumU8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection", "TestNamespace") }); var enumU8Collection = runtimeEntityType.AddProperty( "EnumU8Collection", @@ -6026,20 +5938,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance) == null); enumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[87]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( index: 87, originalValueIndex: 87, @@ -6048,17 +5960,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6067,38 +5979,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); enumU8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection", "TestNamespace") }); var @float = runtimeEntityType.AddProperty( "Float", @@ -6107,20 +6018,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Float>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0f); @float.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity).Equals(0F), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance).Equals(0F)); + float (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity).Equals(0F), + float (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance).Equals(0F)); @float.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), - (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), - (ValueBuffer valueBuffer) => valueBuffer[88]); + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), + float (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), + object (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( index: 88, originalValueIndex: 88, @@ -6129,19 +6040,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @float.TypeMapping = SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)); @float.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @float.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float", "TestNamespace") }); var floatArray = runtimeEntityType.AddProperty( "FloatArray", @@ -6149,20 +6059,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("FloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<FloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); floatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance) == null); + float[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity) == null, + float[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance) == null); floatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), - (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), + float[] (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), + object (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( index: 89, originalValueIndex: 89, @@ -6171,17 +6081,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); floatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), keyComparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6193,19 +6103,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))); floatArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - floatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray", "TestNamespace") }); var guid = runtimeEntityType.AddProperty( "Guid", @@ -6214,20 +6123,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Guid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); guid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), - (ValueBuffer valueBuffer) => valueBuffer[90]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), + object (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( index: 90, originalValueIndex: 90, @@ -6236,21 +6145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guid.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); guid.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid", "TestNamespace") }); var guidArray = runtimeEntityType.AddProperty( "GuidArray", @@ -6258,20 +6166,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance) == null); + Guid[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity) == null, + Guid[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance) == null); guidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[91]); + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), + Guid[] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), + object (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( index: 91, originalValueIndex: 91, @@ -6280,17 +6188,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6302,21 +6210,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))); guidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray", "TestNamespace") }); var guidNestedCollection = runtimeEntityType.AddProperty( "GuidNestedCollection", @@ -6324,20 +6231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance) == null); + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) == null, + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance) == null); guidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[92]); + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[92]); guidNestedCollection.SetPropertyIndexes( index: 92, originalValueIndex: 92, @@ -6346,17 +6253,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6372,17 +6279,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6396,17 +6303,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6418,21 +6325,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))))); guidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection", "TestNamespace") }); var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", @@ -6441,20 +6347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToBytesConverter()); guidToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[93]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( index: 93, originalValueIndex: 93, @@ -6463,31 +6369,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)), + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)))); + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)))); guidToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); guidToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty", "TestNamespace") }); var guidToStringConverterProperty = runtimeEntityType.AddProperty( "GuidToStringConverterProperty", @@ -6496,20 +6401,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToStringConverter()); guidToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[94]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( index: 94, originalValueIndex: 94, @@ -6518,33 +6423,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(36)", size: 36, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)), + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, string>( JsonStringReaderWriter.Instance, new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)))); + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); guidToStringConverterProperty.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); guidToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - guidToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty", "TestNamespace") }); var iPAddress = runtimeEntityType.AddProperty( "IPAddress", @@ -6552,20 +6456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance) == null); iPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[95]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( index: 95, originalValueIndex: 95, @@ -6574,32 +6478,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); iPAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress", "TestNamespace") }); var iPAddressArray = runtimeEntityType.AddProperty( "IPAddressArray", @@ -6607,20 +6510,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance) == null); iPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[96]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( index: 96, originalValueIndex: 96, @@ -6629,17 +6532,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6648,43 +6551,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); iPAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray", "TestNamespace") }); var iPAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "IPAddressToBytesConverterProperty", @@ -6693,20 +6595,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToBytesConverter()); iPAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance) == null); iPAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[97]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( index: 97, originalValueIndex: 97, @@ -6715,30 +6617,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(16)", size: 16), converter: new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)), + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)))); + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)))); iPAddressToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty", "TestNamespace") }); var iPAddressToStringConverterProperty = runtimeEntityType.AddProperty( "IPAddressToStringConverterProperty", @@ -6747,20 +6648,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToStringConverter()); iPAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance) == null); iPAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[98]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( index: 98, originalValueIndex: 98, @@ -6769,32 +6670,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); iPAddressToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - iPAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty", "TestNamespace") }); var int16 = runtimeEntityType.AddProperty( "Int16", @@ -6803,20 +6703,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (short)0); int16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance) == 0); + short (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity) == 0, + short (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance) == 0); int16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), - (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), - (ValueBuffer valueBuffer) => valueBuffer[99]); + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), + short (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), + object (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( index: 99, originalValueIndex: 99, @@ -6825,19 +6725,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)); int16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16", "TestNamespace") }); var int16Array = runtimeEntityType.AddProperty( "Int16Array", @@ -6845,20 +6744,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance) == null); + short[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity) == null, + short[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance) == null); int16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), - (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[100]); + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), + short[] (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), + object (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( index: 100, originalValueIndex: 100, @@ -6867,17 +6766,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6889,19 +6788,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); int16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array", "TestNamespace") }); var int32 = runtimeEntityType.AddProperty( "Int32", @@ -6910,20 +6808,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); int32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance) == 0); int32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), - (ValueBuffer valueBuffer) => valueBuffer[101]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), + object (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( index: 101, originalValueIndex: 101, @@ -6932,19 +6830,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); int32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32", "TestNamespace") }); var int32Array = runtimeEntityType.AddProperty( "Int32Array", @@ -6952,20 +6849,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance) == null); + int[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity) == null, + int[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance) == null); int32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[102]); + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), + int[] (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), + object (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( index: 102, originalValueIndex: 102, @@ -6974,17 +6871,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -6996,19 +6893,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))); int32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array", "TestNamespace") }); var int32NestedCollection = runtimeEntityType.AddProperty( "Int32NestedCollection", @@ -7016,20 +6912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance) == null); + int[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) == null, + int[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance) == null); int32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[103]); + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), + int[][] (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[103]); int32NestedCollection.SetPropertyIndexes( index: 103, originalValueIndex: 103, @@ -7038,17 +6934,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7062,17 +6958,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7084,19 +6980,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))); int32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection", "TestNamespace") }); var int64 = runtimeEntityType.AddProperty( "Int64", @@ -7105,20 +7000,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0L); int64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) == 0L, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance) == 0L); + long (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity) == 0L, + long (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance) == 0L); int64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), - (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), - (ValueBuffer valueBuffer) => valueBuffer[104]); + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), + long (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), + object (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( index: 104, originalValueIndex: 104, @@ -7127,19 +7022,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); int64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64", "TestNamespace") }); var int64Array = runtimeEntityType.AddProperty( "Int64Array", @@ -7147,20 +7041,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance) == null); + long[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity) == null, + long[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance) == null); int64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), - (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[105]); + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), + long[] (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), + object (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( index: 105, originalValueIndex: 105, @@ -7169,17 +7063,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7191,19 +7085,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))); int64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array", "TestNamespace") }); var int64NestedCollection = runtimeEntityType.AddProperty( "Int64NestedCollection", @@ -7211,20 +7104,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance) == null); + IList<long[]>[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) == null, + IList<long[]>[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance) == null); int64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[106]); + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), + IList<long[]>[] (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[106]); int64NestedCollection.SetPropertyIndexes( index: 106, originalValueIndex: 106, @@ -7233,17 +7126,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7259,17 +7152,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7283,17 +7176,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7305,19 +7198,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))); int64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection", "TestNamespace") }); var int8 = runtimeEntityType.AddProperty( "Int8", @@ -7325,20 +7217,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance) == 0); + sbyte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity) == 0, + sbyte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance) == 0); int8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), - (ValueBuffer valueBuffer) => valueBuffer[107]); + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), + sbyte (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), + object (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( index: 107, originalValueIndex: 107, @@ -7347,28 +7239,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))); int8.SetSentinelFromProviderValue((short)0); int8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8", "TestNamespace") }); var int8Array = runtimeEntityType.AddProperty( "Int8Array", @@ -7376,20 +7267,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance) == null); + sbyte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity) == null, + sbyte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance) == null); int8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[108]); + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), + sbyte[] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), + object (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( index: 108, originalValueIndex: 108, @@ -7398,17 +7289,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7417,38 +7308,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))); int8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array", "TestNamespace") }); var int8NestedCollection = runtimeEntityType.AddProperty( "Int8NestedCollection", @@ -7456,20 +7346,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance) == null); + sbyte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) == null, + sbyte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance) == null); int8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[109]); + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), + sbyte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[109]); int8NestedCollection.SetPropertyIndexes( index: 109, originalValueIndex: 109, @@ -7478,17 +7368,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7499,8 +7389,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<sbyte[][][], sbyte[][]>( new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( @@ -7508,21 +7398,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7532,29 +7422,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7563,38 +7453,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))))); int8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - int8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection", "TestNamespace") }); var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", @@ -7603,20 +7492,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<int>()); intNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance) == 0); intNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[110]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( index: 110, originalValueIndex: 110, @@ -7625,31 +7514,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(4)", size: 4), converter: new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)), + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)))); + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))))); intNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0 }); intNumberToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - intNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty", "TestNamespace") }); var intNumberToStringConverterProperty = runtimeEntityType.AddProperty( "IntNumberToStringConverterProperty", @@ -7658,20 +7546,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<int>()); intNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance) == 0); intNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[111]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( index: 111, originalValueIndex: 111, @@ -7680,33 +7568,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(64)", size: 64, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, string>( JsonStringReaderWriter.Instance, new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); intNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); intNumberToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - intNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty", "TestNamespace") }); var nullIntToNullStringConverterProperty = runtimeEntityType.AddProperty( "NullIntToNullStringConverterProperty", @@ -7716,20 +7603,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullable: true, valueConverter: new CompiledModelTestBase.NullIntToNullStringConverter()); nullIntToNullStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance).HasValue)); nullIntToNullStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullIntToNullStringConverterProperty, 112), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[112]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullIntToNullStringConverterProperty, 112), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullIntToNullStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( index: 112, originalValueIndex: 112, @@ -7738,34 +7625,33 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullIntToNullStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), keyComparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int?, string>( JsonStringReaderWriter.Instance, new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true))); nullIntToNullStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullIntToNullStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty", "TestNamespace") }); var nullableBool = runtimeEntityType.AddProperty( "NullableBool", @@ -7774,20 +7660,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance).HasValue); + bool? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableBool(entity).HasValue), + bool? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableBool(instance).HasValue)); nullableBool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>>(nullableBool, 113), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[113]); + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => entry.ReadOriginalValue<bool?>(nullableBool, 113), + bool? (InternalEntityEntry entry) => entry.GetCurrentValue<bool?>(nullableBool), + object (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( index: 113, originalValueIndex: 113, @@ -7796,21 +7682,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBool.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)); nullableBool.SetValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.Comparer)); nullableBool.SetKeyValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.KeyComparer)); nullableBool.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool", "TestNamespace") }); var nullableBoolArray = runtimeEntityType.AddProperty( "NullableBoolArray", @@ -7818,20 +7703,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBoolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance) == null); + bool? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) == null, + bool? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance) == null); nullableBoolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>[]>(nullableBoolArray, 114), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool? []>(nullableBoolArray, 114), + bool? [] (InternalEntityEntry entry) => entry.GetCurrentValue<bool? []>(nullableBoolArray), + object (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( index: 114, originalValueIndex: 114, @@ -7840,17 +7725,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7862,19 +7747,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))); nullableBoolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBoolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray", "TestNamespace") }); var nullableBytes = runtimeEntityType.AddProperty( "NullableBytes", @@ -7883,20 +7767,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance) == null); nullableBytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[115]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), + object (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( index: 115, originalValueIndex: 115, @@ -7905,22 +7789,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytes.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); nullableBytes.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes", "TestNamespace") }); var nullableBytesArray = runtimeEntityType.AddProperty( "NullableBytesArray", @@ -7928,20 +7811,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance) == null); nullableBytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( index: 116, originalValueIndex: 116, @@ -7950,17 +7833,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -7972,22 +7855,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); nullableBytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray", "TestNamespace") }); var nullableBytesNestedCollection = runtimeEntityType.AddProperty( "NullableBytesNestedCollection", @@ -7995,20 +7877,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance) == null); nullableBytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[117]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[117]); nullableBytesNestedCollection.SetPropertyIndexes( index: 117, originalValueIndex: 117, @@ -8017,17 +7899,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8041,17 +7923,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8063,22 +7945,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None))); nullableBytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableBytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection", "TestNamespace") }); var nullableChar = runtimeEntityType.AddProperty( "NullableChar", @@ -8087,20 +7968,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableChar>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableChar.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance).HasValue); + char? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableChar(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableChar(entity).HasValue), + char? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableChar(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableChar(instance).HasValue)); nullableChar.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>>(nullableChar, 118), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[118]); + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => entry.ReadOriginalValue<char?>(nullableChar, 118), + char? (InternalEntityEntry entry) => entry.GetCurrentValue<char?>(nullableChar), + object (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( index: 118, originalValueIndex: 118, @@ -8109,34 +7990,33 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableChar.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); nullableChar.SetValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.Comparer)); nullableChar.SetKeyValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.KeyComparer)); nullableChar.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableChar.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar", "TestNamespace") }); var nullableCharArray = runtimeEntityType.AddProperty( "NullableCharArray", @@ -8144,20 +8024,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableCharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableCharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableCharArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance) == null); + char? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity) == null, + char? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance) == null); nullableCharArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>[]>(nullableCharArray, 119), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[119]); + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<char? []>(nullableCharArray, 119), + char? [] (InternalEntityEntry entry) => entry.GetCurrentValue<char? []>(nullableCharArray), + object (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( index: 119, originalValueIndex: 119, @@ -8166,17 +8046,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8185,43 +8065,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0])))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0]))))); nullableCharArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableCharArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray", "TestNamespace") }); var nullableDateOnly = runtimeEntityType.AddProperty( "NullableDateOnly", @@ -8230,20 +8109,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance).HasValue); + DateOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateOnly(entity).HasValue), + DateOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateOnly(instance).HasValue)); nullableDateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>>(nullableDateOnly, 120), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[120]); + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly?>(nullableDateOnly, 120), + DateOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly?>(nullableDateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( index: 120, originalValueIndex: 120, @@ -8252,21 +8131,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnly.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)); nullableDateOnly.SetValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.Comparer)); nullableDateOnly.SetKeyValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.KeyComparer)); nullableDateOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly", "TestNamespace") }); var nullableDateOnlyArray = runtimeEntityType.AddProperty( "NullableDateOnlyArray", @@ -8274,20 +8152,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance) == null); + DateOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) == null, + DateOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance) == null); nullableDateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>[]>(nullableDateOnlyArray, 121), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[121]); + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly? []>(nullableDateOnlyArray, 121), + DateOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( index: 121, originalValueIndex: 121, @@ -8296,17 +8174,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8318,19 +8196,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))); + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))); nullableDateOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray", "TestNamespace") }); var nullableDateTime = runtimeEntityType.AddProperty( "NullableDateTime", @@ -8339,20 +8216,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance).HasValue); + DateTime? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateTime(entity).HasValue), + DateTime? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateTime(instance).HasValue)); nullableDateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>>(nullableDateTime, 122), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[122]); + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime?>(nullableDateTime, 122), + DateTime? (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime?>(nullableDateTime), + object (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( index: 122, originalValueIndex: 122, @@ -8361,21 +8238,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTime.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)); nullableDateTime.SetValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.Comparer)); nullableDateTime.SetKeyValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.KeyComparer)); nullableDateTime.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime", "TestNamespace") }); var nullableDateTimeArray = runtimeEntityType.AddProperty( "NullableDateTimeArray", @@ -8383,20 +8259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance) == null); + DateTime? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) == null, + DateTime? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance) == null); nullableDateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>[]>(nullableDateTimeArray, 123), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[123]); + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime? []>(nullableDateTimeArray, 123), + DateTime? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime? []>(nullableDateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( index: 123, originalValueIndex: 123, @@ -8405,17 +8281,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8427,19 +8303,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); nullableDateTimeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray", "TestNamespace") }); var nullableDecimal = runtimeEntityType.AddProperty( "NullableDecimal", @@ -8448,20 +8323,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDecimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance).HasValue); + decimal? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDecimal(entity).HasValue), + decimal? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDecimal(instance).HasValue)); nullableDecimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>>(nullableDecimal, 124), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[124]); + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal?>(nullableDecimal, 124), + decimal? (InternalEntityEntry entry) => entry.GetCurrentValue<decimal?>(nullableDecimal), + object (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( index: 124, originalValueIndex: 124, @@ -8470,21 +8345,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimal.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)); nullableDecimal.SetValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.Comparer)); nullableDecimal.SetKeyValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.KeyComparer)); nullableDecimal.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDecimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal", "TestNamespace") }); var nullableDecimalArray = runtimeEntityType.AddProperty( "NullableDecimalArray", @@ -8492,20 +8366,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDecimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance) == null); + decimal? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) == null, + decimal? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance) == null); nullableDecimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>[]>(nullableDecimalArray, 125), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[125]); + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal? []>(nullableDecimalArray, 125), + decimal? [] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal? []>(nullableDecimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( index: 125, originalValueIndex: 125, @@ -8514,17 +8388,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), keyComparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8536,19 +8410,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))); + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))); nullableDecimalArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDecimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray", "TestNamespace") }); var nullableDouble = runtimeEntityType.AddProperty( "NullableDouble", @@ -8557,20 +8430,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDouble>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDouble.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance).HasValue); + double? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDouble(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDouble(entity).HasValue), + double? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDouble(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDouble(instance).HasValue)); nullableDouble.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>>(nullableDouble, 126), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[126]); + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => entry.ReadOriginalValue<double?>(nullableDouble, 126), + double? (InternalEntityEntry entry) => entry.GetCurrentValue<double?>(nullableDouble), + object (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( index: 126, originalValueIndex: 126, @@ -8579,21 +8452,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDouble.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)); nullableDouble.SetValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.Comparer)); nullableDouble.SetKeyValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.KeyComparer)); nullableDouble.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDouble.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble", "TestNamespace") }); var nullableDoubleArray = runtimeEntityType.AddProperty( "NullableDoubleArray", @@ -8601,20 +8473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDoubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance) == null); + double? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) == null, + double? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance) == null); nullableDoubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>[]>(nullableDoubleArray, 127), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[127]); + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<double? []>(nullableDoubleArray, 127), + double? [] (InternalEntityEntry entry) => entry.GetCurrentValue<double? []>(nullableDoubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( index: 127, originalValueIndex: 127, @@ -8623,17 +8495,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), keyComparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8645,19 +8517,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))); + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))); nullableDoubleArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableDoubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray", "TestNamespace") }); var nullableEnum16 = runtimeEntityType.AddProperty( "NullableEnum16", @@ -8666,20 +8537,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16(instance).HasValue)); nullableEnum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16, 128), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[128]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16, 128), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16), + object (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( index: 128, originalValueIndex: 128, @@ -8688,29 +8559,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.Comparer)); nullableEnum16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.KeyComparer)); nullableEnum16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16", "TestNamespace") }); var nullableEnum16Array = runtimeEntityType.AddProperty( "NullableEnum16Array", @@ -8718,20 +8588,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance) == null); nullableEnum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array, 129), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[129]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array, 129), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( index: 129, originalValueIndex: 129, @@ -8740,17 +8610,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8759,38 +8629,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array", "TestNamespace") }); var nullableEnum16AsString = runtimeEntityType.AddProperty( "NullableEnum16AsString", @@ -8799,20 +8668,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(instance).HasValue)); nullableEnum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString, 130), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[130]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString, 130), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( index: 130, originalValueIndex: 130, @@ -8821,29 +8690,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsString.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.Comparer)); nullableEnum16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.KeyComparer)); nullableEnum16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString", "TestNamespace") }); var nullableEnum16AsStringArray = runtimeEntityType.AddProperty( "NullableEnum16AsStringArray", @@ -8851,20 +8719,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance) == null); nullableEnum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray, 131), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[131]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray, 131), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( index: 131, originalValueIndex: 131, @@ -8873,17 +8741,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8892,38 +8760,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray", "TestNamespace") }); var nullableEnum16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum16AsStringCollection", @@ -8931,20 +8798,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance) == null); nullableEnum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection, 132), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[132]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection, 132), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( index: 132, originalValueIndex: 132, @@ -8953,17 +8820,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -8972,38 +8839,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection", "TestNamespace") }); var nullableEnum16Collection = runtimeEntityType.AddProperty( "NullableEnum16Collection", @@ -9011,20 +8877,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance) == null); nullableEnum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection, 133), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection, 133), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( index: 133, originalValueIndex: 133, @@ -9033,17 +8899,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9052,38 +8918,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection", "TestNamespace") }); var nullableEnum32 = runtimeEntityType.AddProperty( "NullableEnum32", @@ -9092,20 +8957,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32(instance).HasValue)); nullableEnum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32, 134), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[134]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32, 134), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32), + object (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( index: 134, originalValueIndex: 134, @@ -9114,29 +8979,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.Comparer)); nullableEnum32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.KeyComparer)); nullableEnum32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32", "TestNamespace") }); var nullableEnum32Array = runtimeEntityType.AddProperty( "NullableEnum32Array", @@ -9144,20 +9008,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance) == null); nullableEnum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array, 135), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[135]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array, 135), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( index: 135, originalValueIndex: 135, @@ -9166,17 +9030,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9185,38 +9049,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array", "TestNamespace") }); var nullableEnum32AsString = runtimeEntityType.AddProperty( "NullableEnum32AsString", @@ -9225,20 +9088,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(instance).HasValue)); nullableEnum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString, 136), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[136]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString, 136), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( index: 136, originalValueIndex: 136, @@ -9247,29 +9110,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.Comparer)); nullableEnum32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.KeyComparer)); nullableEnum32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString", "TestNamespace") }); var nullableEnum32AsStringArray = runtimeEntityType.AddProperty( "NullableEnum32AsStringArray", @@ -9277,20 +9139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance) == null); nullableEnum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray, 137), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[137]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray, 137), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( index: 137, originalValueIndex: 137, @@ -9299,17 +9161,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9318,38 +9180,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray", "TestNamespace") }); var nullableEnum32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum32AsStringCollection", @@ -9357,20 +9218,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance) == null); nullableEnum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection, 138), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[138]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection, 138), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( index: 138, originalValueIndex: 138, @@ -9379,17 +9240,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9398,38 +9259,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection", "TestNamespace") }); var nullableEnum32Collection = runtimeEntityType.AddProperty( "NullableEnum32Collection", @@ -9437,20 +9297,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance) == null); nullableEnum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection, 139), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection, 139), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( index: 139, originalValueIndex: 139, @@ -9459,17 +9319,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9478,38 +9338,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection", "TestNamespace") }); var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( "NullableEnum32NestedCollection", @@ -9517,20 +9376,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance) == null); + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) == null, + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance) == null); nullableEnum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection, 140), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection, 140), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[140]); nullableEnum32NestedCollection.SetPropertyIndexes( index: 140, originalValueIndex: 140, @@ -9539,17 +9398,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9560,8 +9419,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( @@ -9569,21 +9428,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9593,29 +9452,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9624,38 +9483,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); nullableEnum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection", "TestNamespace") }); var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", @@ -9664,20 +9522,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64(instance).HasValue)); nullableEnum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64, 141), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[141]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64, 141), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64), + object (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( index: 141, originalValueIndex: 141, @@ -9686,29 +9544,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.Comparer)); nullableEnum64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.KeyComparer)); nullableEnum64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64", "TestNamespace") }); var nullableEnum64Array = runtimeEntityType.AddProperty( "NullableEnum64Array", @@ -9716,20 +9573,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance) == null); nullableEnum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array, 142), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array, 142), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( index: 142, originalValueIndex: 142, @@ -9738,17 +9595,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9757,38 +9614,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array", "TestNamespace") }); var nullableEnum64AsString = runtimeEntityType.AddProperty( "NullableEnum64AsString", @@ -9797,20 +9653,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(instance).HasValue)); nullableEnum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString, 143), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString, 143), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( index: 143, originalValueIndex: 143, @@ -9819,29 +9675,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsString.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.Comparer)); nullableEnum64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.KeyComparer)); nullableEnum64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString", "TestNamespace") }); var nullableEnum64AsStringArray = runtimeEntityType.AddProperty( "NullableEnum64AsStringArray", @@ -9849,20 +9704,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance) == null); nullableEnum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray, 144), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray, 144), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( index: 144, originalValueIndex: 144, @@ -9871,17 +9726,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9890,38 +9745,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray", "TestNamespace") }); var nullableEnum64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum64AsStringCollection", @@ -9929,20 +9783,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance) == null); nullableEnum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection, 145), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection, 145), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( index: 145, originalValueIndex: 145, @@ -9951,17 +9805,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -9970,38 +9824,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection", "TestNamespace") }); var nullableEnum64Collection = runtimeEntityType.AddProperty( "NullableEnum64Collection", @@ -10009,20 +9862,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance) == null); nullableEnum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection, 146), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection, 146), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( index: 146, originalValueIndex: 146, @@ -10031,17 +9884,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10050,38 +9903,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection", "TestNamespace") }); var nullableEnum8 = runtimeEntityType.AddProperty( "NullableEnum8", @@ -10090,20 +9942,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8(instance).HasValue)); nullableEnum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8, 147), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[147]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8, 147), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8), + object (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( index: 147, originalValueIndex: 147, @@ -10112,29 +9964,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.Comparer)); nullableEnum8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.KeyComparer)); nullableEnum8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8", "TestNamespace") }); var nullableEnum8Array = runtimeEntityType.AddProperty( "NullableEnum8Array", @@ -10142,20 +9993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance) == null); nullableEnum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array, 148), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array, 148), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( index: 148, originalValueIndex: 148, @@ -10164,17 +10015,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10183,38 +10034,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array", "TestNamespace") }); var nullableEnum8AsString = runtimeEntityType.AddProperty( "NullableEnum8AsString", @@ -10223,20 +10073,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(instance).HasValue)); nullableEnum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString, 149), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString, 149), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( index: 149, originalValueIndex: 149, @@ -10245,29 +10095,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsString.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.Comparer)); nullableEnum8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.KeyComparer)); nullableEnum8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString", "TestNamespace") }); var nullableEnum8AsStringArray = runtimeEntityType.AddProperty( "NullableEnum8AsStringArray", @@ -10275,20 +10124,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance) == null); nullableEnum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray, 150), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray, 150), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( index: 150, originalValueIndex: 150, @@ -10297,17 +10146,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10316,38 +10165,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray", "TestNamespace") }); var nullableEnum8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum8AsStringCollection", @@ -10355,20 +10203,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance) == null); nullableEnum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection, 151), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection, 151), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( index: 151, originalValueIndex: 151, @@ -10377,17 +10225,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10396,38 +10244,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection", "TestNamespace") }); var nullableEnum8Collection = runtimeEntityType.AddProperty( "NullableEnum8Collection", @@ -10435,20 +10282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance) == null); nullableEnum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection, 152), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection, 152), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( index: 152, originalValueIndex: 152, @@ -10457,17 +10304,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10476,38 +10323,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection", "TestNamespace") }); var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( "NullableEnum8NestedCollection", @@ -10515,20 +10361,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance) == null); nullableEnum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection, 153), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[153]); + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection, 153), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[153]); nullableEnum8NestedCollection.SetPropertyIndexes( index: 153, originalValueIndex: 153, @@ -10537,17 +10383,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10557,29 +10403,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10588,38 +10434,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value)))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value), + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, short>( - (CompiledModelTestBase.Enum8 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum8)value))))); + short (CompiledModelTestBase.Enum8 value) => ((short)(value)), + CompiledModelTestBase.Enum8 (short value) => ((CompiledModelTestBase.Enum8)(value))))))); nullableEnum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection", "TestNamespace") }); var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", @@ -10628,20 +10473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16(instance).HasValue)); nullableEnumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16, 154), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[154]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16, 154), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16), + object (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( index: 154, originalValueIndex: 154, @@ -10650,29 +10495,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.Comparer)); nullableEnumU16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.KeyComparer)); nullableEnumU16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16", "TestNamespace") }); var nullableEnumU16Array = runtimeEntityType.AddProperty( "NullableEnumU16Array", @@ -10680,20 +10524,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance) == null); nullableEnumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array, 155), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[155]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array, 155), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( index: 155, originalValueIndex: 155, @@ -10702,17 +10546,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10721,38 +10565,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array", "TestNamespace") }); var nullableEnumU16AsString = runtimeEntityType.AddProperty( "NullableEnumU16AsString", @@ -10761,20 +10604,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance).HasValue)); nullableEnumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString, 156), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[156]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString, 156), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( index: 156, originalValueIndex: 156, @@ -10783,29 +10626,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.Comparer)); nullableEnumU16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.KeyComparer)); nullableEnumU16AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString", "TestNamespace") }); var nullableEnumU16AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU16AsStringArray", @@ -10813,20 +10655,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance) == null); nullableEnumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray, 157), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[157]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray, 157), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( index: 157, originalValueIndex: 157, @@ -10835,17 +10677,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10854,38 +10696,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray", "TestNamespace") }); var nullableEnumU16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU16AsStringCollection", @@ -10893,20 +10734,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance) == null); nullableEnumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection, 158), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection, 158), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( index: 158, originalValueIndex: 158, @@ -10915,17 +10756,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -10934,38 +10775,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection", "TestNamespace") }); var nullableEnumU16Collection = runtimeEntityType.AddProperty( "NullableEnumU16Collection", @@ -10973,20 +10813,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance) == null); nullableEnumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection, 159), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[159]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection, 159), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( index: 159, originalValueIndex: 159, @@ -10995,17 +10835,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11014,38 +10854,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value))), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value), + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, int>( - (CompiledModelTestBase.EnumU16 value) => (int)value, - (int value) => (CompiledModelTestBase.EnumU16)value)))); + int (CompiledModelTestBase.EnumU16 value) => ((int)(value)), + CompiledModelTestBase.EnumU16 (int value) => ((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection", "TestNamespace") }); var nullableEnumU32 = runtimeEntityType.AddProperty( "NullableEnumU32", @@ -11054,20 +10893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32(instance).HasValue)); nullableEnumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32, 160), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[160]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32, 160), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32), + object (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( index: 160, originalValueIndex: 160, @@ -11076,29 +10915,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.Comparer)); nullableEnumU32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.KeyComparer)); nullableEnumU32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32", "TestNamespace") }); var nullableEnumU32Array = runtimeEntityType.AddProperty( "NullableEnumU32Array", @@ -11106,20 +10944,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance) == null); nullableEnumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array, 161), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[161]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array, 161), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( index: 161, originalValueIndex: 161, @@ -11128,17 +10966,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11147,38 +10985,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array", "TestNamespace") }); var nullableEnumU32AsString = runtimeEntityType.AddProperty( "NullableEnumU32AsString", @@ -11187,20 +11024,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance).HasValue)); nullableEnumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString, 162), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[162]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString, 162), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( index: 162, originalValueIndex: 162, @@ -11209,29 +11046,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsString.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.Comparer)); nullableEnumU32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.KeyComparer)); nullableEnumU32AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString", "TestNamespace") }); var nullableEnumU32AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU32AsStringArray", @@ -11239,20 +11075,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance) == null); nullableEnumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray, 163), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[163]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray, 163), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( index: 163, originalValueIndex: 163, @@ -11261,17 +11097,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11280,38 +11116,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray", "TestNamespace") }); var nullableEnumU32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU32AsStringCollection", @@ -11319,20 +11154,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance) == null); nullableEnumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection, 164), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection, 164), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( index: 164, originalValueIndex: 164, @@ -11341,17 +11176,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11360,38 +11195,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection", "TestNamespace") }); var nullableEnumU32Collection = runtimeEntityType.AddProperty( "NullableEnumU32Collection", @@ -11399,20 +11233,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance) == null); nullableEnumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection, 165), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[165]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection, 165), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( index: 165, originalValueIndex: 165, @@ -11421,17 +11255,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11440,38 +11274,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value))), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value), + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, long>( - (CompiledModelTestBase.EnumU32 value) => (long)value, - (long value) => (CompiledModelTestBase.EnumU32)value)))); + long (CompiledModelTestBase.EnumU32 value) => ((long)(value)), + CompiledModelTestBase.EnumU32 (long value) => ((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection", "TestNamespace") }); var nullableEnumU64 = runtimeEntityType.AddProperty( "NullableEnumU64", @@ -11480,20 +11313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64(instance).HasValue)); nullableEnumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64, 166), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[166]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64, 166), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64), + object (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( index: 166, originalValueIndex: 166, @@ -11502,33 +11335,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); nullableEnumU64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.Comparer)); nullableEnumU64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.KeyComparer)); nullableEnumU64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64", "TestNamespace") }); var nullableEnumU64Array = runtimeEntityType.AddProperty( "NullableEnumU64Array", @@ -11536,20 +11368,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance) == null); nullableEnumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array, 167), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[167]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array, 167), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( index: 167, originalValueIndex: 167, @@ -11558,17 +11390,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11577,42 +11409,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array", "TestNamespace") }); var nullableEnumU64AsString = runtimeEntityType.AddProperty( "NullableEnumU64AsString", @@ -11621,20 +11452,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance).HasValue)); nullableEnumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString, 168), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[168]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString, 168), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( index: 168, originalValueIndex: 168, @@ -11643,33 +11474,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsString.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))); nullableEnumU64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.Comparer)); nullableEnumU64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.KeyComparer)); nullableEnumU64AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString", "TestNamespace") }); var nullableEnumU64AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU64AsStringArray", @@ -11677,20 +11507,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance) == null); nullableEnumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray, 169), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[169]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray, 169), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( index: 169, originalValueIndex: 169, @@ -11699,17 +11529,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11718,42 +11548,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray", "TestNamespace") }); var nullableEnumU64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU64AsStringCollection", @@ -11761,20 +11590,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance) == null); nullableEnumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection, 170), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[170]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection, 170), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( index: 170, originalValueIndex: 170, @@ -11783,17 +11612,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11802,42 +11631,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection", "TestNamespace") }); var nullableEnumU64Collection = runtimeEntityType.AddProperty( "NullableEnumU64Collection", @@ -11845,20 +11673,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance) == null); nullableEnumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection, 171), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[171]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection, 171), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( index: 171, originalValueIndex: 171, @@ -11867,17 +11695,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11886,42 +11714,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))); nullableEnumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection", "TestNamespace") }); var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( "NullableEnumU64NestedCollection", @@ -11929,20 +11756,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance) == null); nullableEnumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection, 172), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[172]); + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection, 172), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[172]); nullableEnumU64NestedCollection.SetPropertyIndexes( index: 172, originalValueIndex: 172, @@ -11951,17 +11778,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -11971,29 +11798,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12002,42 +11829,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value)))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, decimal>( - (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, - (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + decimal (CompiledModelTestBase.EnumU64 value) => ((decimal)(((long)(value)))), + CompiledModelTestBase.EnumU64 (decimal value) => ((CompiledModelTestBase.EnumU64)(((long)(value))))))))); nullableEnumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection", "TestNamespace") }); var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", @@ -12046,20 +11872,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8(instance).HasValue)); nullableEnumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8, 173), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[173]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8, 173), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8), + object (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( index: 173, originalValueIndex: 173, @@ -12068,29 +11894,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.Comparer)); nullableEnumU8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.KeyComparer)); nullableEnumU8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8", "TestNamespace") }); var nullableEnumU8Array = runtimeEntityType.AddProperty( "NullableEnumU8Array", @@ -12098,20 +11923,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance) == null); nullableEnumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array, 174), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array, 174), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( index: 174, originalValueIndex: 174, @@ -12120,17 +11945,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12139,38 +11964,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array", "TestNamespace") }); var nullableEnumU8AsString = runtimeEntityType.AddProperty( "NullableEnumU8AsString", @@ -12179,20 +12003,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance).HasValue)); nullableEnumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString, 175), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[175]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString, 175), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( index: 175, originalValueIndex: 175, @@ -12201,29 +12025,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsString.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.Comparer)); nullableEnumU8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.KeyComparer)); nullableEnumU8AsString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString", "TestNamespace") }); var nullableEnumU8AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU8AsStringArray", @@ -12231,20 +12054,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance) == null); nullableEnumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray, 176), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[176]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray, 176), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( index: 176, originalValueIndex: 176, @@ -12253,17 +12076,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12272,38 +12095,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray", "TestNamespace") }); var nullableEnumU8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU8AsStringCollection", @@ -12311,20 +12133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance) == null); nullableEnumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection, 177), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[177]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection, 177), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( index: 177, originalValueIndex: 177, @@ -12333,17 +12155,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12352,38 +12174,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsStringCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection", "TestNamespace") }); var nullableEnumU8Collection = runtimeEntityType.AddProperty( "NullableEnumU8Collection", @@ -12391,20 +12212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance) == null); nullableEnumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection, 178), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[178]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection, 178), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( index: 178, originalValueIndex: 178, @@ -12413,17 +12234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12432,38 +12253,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableEnumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection", "TestNamespace") }); var nullableFloat = runtimeEntityType.AddProperty( "NullableFloat", @@ -12472,20 +12292,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloat>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableFloat.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance).HasValue); + float? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloat(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableFloat(entity).HasValue), + float? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloat(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableFloat(instance).HasValue)); nullableFloat.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>>(nullableFloat, 179), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[179]); + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => entry.ReadOriginalValue<float?>(nullableFloat, 179), + float? (InternalEntityEntry entry) => entry.GetCurrentValue<float?>(nullableFloat), + object (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( index: 179, originalValueIndex: 179, @@ -12494,21 +12314,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloat.TypeMapping = SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)); nullableFloat.SetValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.Comparer)); nullableFloat.SetKeyValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.KeyComparer)); nullableFloat.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableFloat.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat", "TestNamespace") }); var nullableFloatArray = runtimeEntityType.AddProperty( "NullableFloatArray", @@ -12516,20 +12335,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableFloatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance) == null); + float? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) == null, + float? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance) == null); nullableFloatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>[]>(nullableFloatArray, 180), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<float? []>(nullableFloatArray, 180), + float? [] (InternalEntityEntry entry) => entry.GetCurrentValue<float? []>(nullableFloatArray), + object (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( index: 180, originalValueIndex: 180, @@ -12538,17 +12357,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), keyComparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12560,19 +12379,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))); + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))); nullableFloatArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableFloatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray", "TestNamespace") }); var nullableGuid = runtimeEntityType.AddProperty( "NullableGuid", @@ -12581,20 +12399,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableGuid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance).HasValue); + Guid? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableGuid(entity).HasValue), + Guid? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableGuid(instance).HasValue)); nullableGuid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>>(nullableGuid, 181), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[181]); + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid?>(nullableGuid, 181), + Guid? (InternalEntityEntry entry) => entry.GetCurrentValue<Guid?>(nullableGuid), + object (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( index: 181, originalValueIndex: 181, @@ -12603,23 +12421,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuid.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); nullableGuid.SetValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.Comparer)); nullableGuid.SetKeyValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.KeyComparer)); nullableGuid.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid", "TestNamespace") }); var nullableGuidArray = runtimeEntityType.AddProperty( "NullableGuidArray", @@ -12627,20 +12444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance) == null); + Guid? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) == null, + Guid? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance) == null); nullableGuidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[]>(nullableGuidArray, 182), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? []>(nullableGuidArray, 182), + Guid? [] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? []>(nullableGuidArray), + object (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( index: 182, originalValueIndex: 182, @@ -12649,17 +12466,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12671,21 +12488,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier"))); nullableGuidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray", "TestNamespace") }); var nullableGuidNestedCollection = runtimeEntityType.AddProperty( "NullableGuidNestedCollection", @@ -12693,20 +12509,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance) == null); + Guid? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) == null, + Guid? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance) == null); nullableGuidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[][]>(nullableGuidNestedCollection, 183), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[183]); + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? [][]>(nullableGuidNestedCollection, 183), + Guid? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[183]); nullableGuidNestedCollection.SetPropertyIndexes( index: 183, originalValueIndex: 183, @@ -12715,17 +12531,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12739,17 +12555,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12761,21 +12577,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")))); nullableGuidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableGuidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection", "TestNamespace") }); var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", @@ -12784,20 +12599,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableIPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance) == null); nullableIPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[184]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( index: 184, originalValueIndex: 184, @@ -12806,32 +12621,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); nullableIPAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableIPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress", "TestNamespace") }); var nullableIPAddressArray = runtimeEntityType.AddProperty( "NullableIPAddressArray", @@ -12839,20 +12653,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableIPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance) == null); nullableIPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[185]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( index: 185, originalValueIndex: 185, @@ -12861,17 +12675,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -12880,43 +12694,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); nullableIPAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableIPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray", "TestNamespace") }); var nullableInt16 = runtimeEntityType.AddProperty( "NullableInt16", @@ -12925,20 +12738,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance).HasValue); + short? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt16(entity).HasValue), + short? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt16(instance).HasValue)); nullableInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>>(nullableInt16, 186), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[186]); + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => entry.ReadOriginalValue<short?>(nullableInt16, 186), + short? (InternalEntityEntry entry) => entry.GetCurrentValue<short?>(nullableInt16), + object (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( index: 186, originalValueIndex: 186, @@ -12947,21 +12760,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)); nullableInt16.SetValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.Comparer)); nullableInt16.SetKeyValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.KeyComparer)); nullableInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16", "TestNamespace") }); var nullableInt16Array = runtimeEntityType.AddProperty( "NullableInt16Array", @@ -12969,20 +12781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance) == null); + short? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) == null, + short? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance) == null); nullableInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>[]>(nullableInt16Array, 187), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[187]); + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<short? []>(nullableInt16Array, 187), + short? [] (InternalEntityEntry entry) => entry.GetCurrentValue<short? []>(nullableInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( index: 187, originalValueIndex: 187, @@ -12991,17 +12803,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), keyComparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13013,19 +12825,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); nullableInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array", "TestNamespace") }); var nullableInt32 = runtimeEntityType.AddProperty( "NullableInt32", @@ -13034,20 +12845,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt32(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt32(instance).HasValue)); nullableInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullableInt32, 188), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[188]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullableInt32, 188), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullableInt32), + object (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( index: 188, originalValueIndex: 188, @@ -13056,21 +12867,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); nullableInt32.SetValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.Comparer)); nullableInt32.SetKeyValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.KeyComparer)); nullableInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32", "TestNamespace") }); var nullableInt32Array = runtimeEntityType.AddProperty( "NullableInt32Array", @@ -13078,20 +12888,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance) == null); + int? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) == null, + int? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance) == null); nullableInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[]>(nullableInt32Array, 189), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[189]); + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? []>(nullableInt32Array, 189), + int? [] (InternalEntityEntry entry) => entry.GetCurrentValue<int? []>(nullableInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( index: 189, originalValueIndex: 189, @@ -13100,17 +12910,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13122,19 +12932,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))); nullableInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array", "TestNamespace") }); var nullableInt32NestedCollection = runtimeEntityType.AddProperty( "NullableInt32NestedCollection", @@ -13142,20 +12951,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance) == null); + int? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) == null, + int? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance) == null); nullableInt32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[][]>(nullableInt32NestedCollection, 190), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[190]); + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? [][]>(nullableInt32NestedCollection, 190), + int? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<int? [][]>(nullableInt32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[190]); nullableInt32NestedCollection.SetPropertyIndexes( index: 190, originalValueIndex: 190, @@ -13164,17 +12973,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), keyComparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13188,17 +12997,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13210,19 +13019,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))); nullableInt32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection", "TestNamespace") }); var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", @@ -13231,20 +13039,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance).HasValue); + long? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt64(entity).HasValue), + long? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt64(instance).HasValue)); nullableInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(nullableInt64, 191), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(nullableInt64, 191), + long? (InternalEntityEntry entry) => entry.GetCurrentValue<long?>(nullableInt64), + object (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( index: 191, originalValueIndex: 191, @@ -13253,21 +13061,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); nullableInt64.SetValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.Comparer)); nullableInt64.SetKeyValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.KeyComparer)); nullableInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64", "TestNamespace") }); var nullableInt64Array = runtimeEntityType.AddProperty( "NullableInt64Array", @@ -13275,20 +13082,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance) == null); + long? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) == null, + long? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance) == null); nullableInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>[]>(nullableInt64Array, 192), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<long? []>(nullableInt64Array, 192), + long? [] (InternalEntityEntry entry) => entry.GetCurrentValue<long? []>(nullableInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( index: 192, originalValueIndex: 192, @@ -13297,17 +13104,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13319,19 +13126,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))); nullableInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array", "TestNamespace") }); var nullableInt64NestedCollection = runtimeEntityType.AddProperty( "NullableInt64NestedCollection", @@ -13339,20 +13145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance) == null); + List<long? [][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) == null, + List<long? [][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance) == null); nullableInt64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection, 193), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[193]); + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<long? [][]>>(nullableInt64NestedCollection, 193), + List<long? [][]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[193]); nullableInt64NestedCollection.SetPropertyIndexes( index: 193, originalValueIndex: 193, @@ -13361,17 +13167,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), keyComparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13387,17 +13193,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13411,17 +13217,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13433,19 +13239,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))); nullableInt64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection", "TestNamespace") }); var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", @@ -13454,20 +13259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance).HasValue); + sbyte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt8(entity).HasValue), + sbyte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt8(instance).HasValue)); nullableInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>>(nullableInt8, 194), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[194]); + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte?>(nullableInt8, 194), + sbyte? (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte?>(nullableInt8), + object (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( index: 194, originalValueIndex: 194, @@ -13476,29 +13281,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8.TypeMapping = SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))); nullableInt8.SetValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.Comparer)); nullableInt8.SetKeyValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.KeyComparer)); nullableInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8", "TestNamespace") }); var nullableInt8Array = runtimeEntityType.AddProperty( "NullableInt8Array", @@ -13506,20 +13310,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance) == null); + sbyte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) == null, + sbyte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance) == null); nullableInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>[]>(nullableInt8Array, 195), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[195]); + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte? []>(nullableInt8Array, 195), + sbyte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte? []>(nullableInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( index: 195, originalValueIndex: 195, @@ -13528,17 +13332,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13547,38 +13351,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v))), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))))), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), converter: new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v), + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<sbyte, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<sbyte, short>( - (sbyte v) => (short)v, - (short v) => (sbyte)v)))); + short (sbyte v) => ((short)(v)), + sbyte (short v) => ((sbyte)(v)))))); nullableInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array", "TestNamespace") }); var nullablePhysicalAddress = runtimeEntityType.AddProperty( "NullablePhysicalAddress", @@ -13587,20 +13390,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullablePhysicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance) == null); nullablePhysicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[196]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( index: 196, originalValueIndex: 196, @@ -13609,32 +13412,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); nullablePhysicalAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress", "TestNamespace") }); var nullablePhysicalAddressArray = runtimeEntityType.AddProperty( "NullablePhysicalAddressArray", @@ -13642,20 +13444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance) == null); nullablePhysicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[197]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( index: 197, originalValueIndex: 197, @@ -13664,17 +13466,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13683,43 +13485,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray", "TestNamespace") }); var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( "NullablePhysicalAddressNestedCollection", @@ -13727,20 +13528,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance) == null); + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) == null, + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance) == null); nullablePhysicalAddressNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[198]); + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[198]); nullablePhysicalAddressNestedCollection.SetPropertyIndexes( index: 198, originalValueIndex: 198, @@ -13749,17 +13550,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13770,8 +13571,8 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( @@ -13779,21 +13580,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13803,29 +13604,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13834,43 +13635,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))); nullablePhysicalAddressNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullablePhysicalAddressNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection", "TestNamespace") }); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -13879,20 +13679,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance) == null); nullableString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[199]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), + object (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( index: 199, originalValueIndex: 199, @@ -13901,24 +13701,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableString.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); nullableString.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString", "TestNamespace") }); var nullableStringArray = runtimeEntityType.AddProperty( "NullableStringArray", @@ -13926,20 +13725,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance) == null); nullableStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[200]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( index: 200, originalValueIndex: 200, @@ -13948,17 +13747,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -13970,24 +13769,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); nullableStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray", "TestNamespace") }); var nullableStringNestedCollection = runtimeEntityType.AddProperty( "NullableStringNestedCollection", @@ -13995,20 +13793,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance) == null); nullableStringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[201]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[201]); nullableStringNestedCollection.SetPropertyIndexes( index: 201, originalValueIndex: 201, @@ -14017,17 +13815,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14041,17 +13839,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14063,24 +13861,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - nullableStringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection", "TestNamespace") }); var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", @@ -14089,20 +13886,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance).HasValue); + TimeOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(entity).HasValue), + TimeOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(instance).HasValue)); nullableTimeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>>(nullableTimeOnly, 202), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[202]); + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly?>(nullableTimeOnly, 202), + TimeOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly?>(nullableTimeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( index: 202, originalValueIndex: 202, @@ -14111,21 +13908,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnly.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)); nullableTimeOnly.SetValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.Comparer)); nullableTimeOnly.SetKeyValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.KeyComparer)); nullableTimeOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly", "TestNamespace") }); var nullableTimeOnlyArray = runtimeEntityType.AddProperty( "NullableTimeOnlyArray", @@ -14133,20 +13929,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance) == null); + TimeOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) == null, + TimeOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance) == null); nullableTimeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray, 203), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[203]); + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly? []>(nullableTimeOnlyArray, 203), + TimeOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( index: 203, originalValueIndex: 203, @@ -14155,17 +13951,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14177,19 +13973,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))); nullableTimeOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray", "TestNamespace") }); var nullableTimeSpan = runtimeEntityType.AddProperty( "NullableTimeSpan", @@ -14198,20 +13993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance).HasValue); + TimeSpan? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(entity).HasValue), + TimeSpan? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(instance).HasValue)); nullableTimeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>>(nullableTimeSpan, 204), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[204]); + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan?>(nullableTimeSpan, 204), + TimeSpan? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan?>(nullableTimeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( index: 204, originalValueIndex: 204, @@ -14220,21 +14015,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpan.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)); nullableTimeSpan.SetValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.Comparer)); nullableTimeSpan.SetKeyValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.KeyComparer)); nullableTimeSpan.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan", "TestNamespace") }); var nullableTimeSpanArray = runtimeEntityType.AddProperty( "NullableTimeSpanArray", @@ -14242,20 +14036,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance) == null); + TimeSpan? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) == null, + TimeSpan? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance) == null); nullableTimeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray, 205), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[205]); + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan? []>(nullableTimeSpanArray, 205), + TimeSpan? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( index: 205, originalValueIndex: 205, @@ -14264,17 +14058,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14286,19 +14080,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))); nullableTimeSpanArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableTimeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray", "TestNamespace") }); var nullableUInt16 = runtimeEntityType.AddProperty( "NullableUInt16", @@ -14307,20 +14100,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance).HasValue); + ushort? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt16(entity).HasValue), + ushort? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt16(instance).HasValue)); nullableUInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>>(nullableUInt16, 206), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[206]); + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort?>(nullableUInt16, 206), + ushort? (InternalEntityEntry entry) => entry.GetCurrentValue<ushort?>(nullableUInt16), + object (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( index: 206, originalValueIndex: 206, @@ -14329,29 +14122,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))); nullableUInt16.SetValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.Comparer)); nullableUInt16.SetKeyValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.KeyComparer)); nullableUInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16", "TestNamespace") }); var nullableUInt16Array = runtimeEntityType.AddProperty( "NullableUInt16Array", @@ -14359,20 +14151,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance) == null); + ushort? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) == null, + ushort? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance) == null); nullableUInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>[]>(nullableUInt16Array, 207), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[207]); + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort? []>(nullableUInt16Array, 207), + ushort? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort? []>(nullableUInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( index: 207, originalValueIndex: 207, @@ -14381,17 +14173,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14400,38 +14192,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))); nullableUInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array", "TestNamespace") }); var nullableUInt32 = runtimeEntityType.AddProperty( "NullableUInt32", @@ -14440,20 +14231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance).HasValue); + uint? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt32(entity).HasValue), + uint? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt32(instance).HasValue)); nullableUInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>>(nullableUInt32, 208), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[208]); + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => entry.ReadOriginalValue<uint?>(nullableUInt32, 208), + uint? (InternalEntityEntry entry) => entry.GetCurrentValue<uint?>(nullableUInt32), + object (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( index: 208, originalValueIndex: 208, @@ -14462,29 +14253,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))); nullableUInt32.SetValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.Comparer)); nullableUInt32.SetKeyValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.KeyComparer)); nullableUInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32", "TestNamespace") }); var nullableUInt32Array = runtimeEntityType.AddProperty( "NullableUInt32Array", @@ -14492,20 +14282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance) == null); + uint? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) == null, + uint? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance) == null); nullableUInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>[]>(nullableUInt32Array, 209), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[209]); + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint? []>(nullableUInt32Array, 209), + uint? [] (InternalEntityEntry entry) => entry.GetCurrentValue<uint? []>(nullableUInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( index: 209, originalValueIndex: 209, @@ -14514,17 +14304,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), keyComparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14533,38 +14323,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))); nullableUInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array", "TestNamespace") }); var nullableUInt64 = runtimeEntityType.AddProperty( "NullableUInt64", @@ -14573,20 +14362,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance).HasValue); + ulong? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt64(entity).HasValue), + ulong? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt64(instance).HasValue)); nullableUInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>>(nullableUInt64, 210), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[210]); + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong?>(nullableUInt64, 210), + ulong? (InternalEntityEntry entry) => entry.GetCurrentValue<ulong?>(nullableUInt64), + object (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( index: 210, originalValueIndex: 210, @@ -14595,33 +14384,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))); nullableUInt64.SetValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.Comparer)); nullableUInt64.SetKeyValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.KeyComparer)); nullableUInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64", "TestNamespace") }); var nullableUInt64Array = runtimeEntityType.AddProperty( "NullableUInt64Array", @@ -14629,20 +14417,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance) == null); + ulong? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) == null, + ulong? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance) == null); nullableUInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>[]>(nullableUInt64Array, 211), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[211]); + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong? []>(nullableUInt64Array, 211), + ulong? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong? []>(nullableUInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( index: 211, originalValueIndex: 211, @@ -14651,17 +14439,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14670,42 +14458,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))); nullableUInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array", "TestNamespace") }); var nullableUInt8 = runtimeEntityType.AddProperty( "NullableUInt8", @@ -14714,20 +14501,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance).HasValue); + byte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt8(entity).HasValue), + byte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt8(instance).HasValue)); nullableUInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(nullableUInt8, 212), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[212]); + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(nullableUInt8, 212), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(nullableUInt8), + object (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( index: 212, originalValueIndex: 212, @@ -14736,21 +14523,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); nullableUInt8.SetValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.Comparer)); nullableUInt8.SetKeyValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.KeyComparer)); nullableUInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8", "TestNamespace") }); var nullableUInt8Array = runtimeEntityType.AddProperty( "NullableUInt8Array", @@ -14758,20 +14544,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance) == null); + byte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) == null, + byte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance) == null); nullableUInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[]>(nullableUInt8Array, 213), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[213]); + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? []>(nullableUInt8Array, 213), + byte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? []>(nullableUInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( index: 213, originalValueIndex: 213, @@ -14780,17 +14566,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14802,19 +14588,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); nullableUInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array", "TestNamespace") }); var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( "NullableUInt8NestedCollection", @@ -14822,20 +14607,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance) == null); + byte? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) == null, + byte? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance) == null); nullableUInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[][]>(nullableUInt8NestedCollection, 214), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[214]); + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? [][]>(nullableUInt8NestedCollection, 214), + byte? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[214]); nullableUInt8NestedCollection.SetPropertyIndexes( index: 214, originalValueIndex: 214, @@ -14844,17 +14629,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14868,17 +14653,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -14890,19 +14675,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))); nullableUInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection", "TestNamespace") }); var nullableUri = runtimeEntityType.AddProperty( "NullableUri", @@ -14911,20 +14695,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance) == null); nullableUri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[215]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), + object (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( index: 215, originalValueIndex: 215, @@ -14933,32 +14717,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUri.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); nullableUri.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri", "TestNamespace") }); var nullableUriArray = runtimeEntityType.AddProperty( "NullableUriArray", @@ -14966,20 +14749,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance) == null); nullableUriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[216]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), + object (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( index: 216, originalValueIndex: 216, @@ -14988,17 +14771,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15007,43 +14790,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); nullableUriArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - nullableUriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray", "TestNamespace") }); var physicalAddress = runtimeEntityType.AddProperty( "PhysicalAddress", @@ -15051,20 +14833,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance) == null); physicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[217]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( index: 217, originalValueIndex: 217, @@ -15073,32 +14855,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddress.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); physicalAddress.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress", "TestNamespace") }); var physicalAddressArray = runtimeEntityType.AddProperty( "PhysicalAddressArray", @@ -15106,20 +14887,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance) == null); physicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( index: 218, originalValueIndex: 218, @@ -15128,17 +14909,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15147,43 +14928,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); physicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray", "TestNamespace") }); var physicalAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToBytesConverterProperty", @@ -15192,20 +14972,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToBytesConverter()); physicalAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance) == null); physicalAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( index: 219, originalValueIndex: 219, @@ -15214,30 +14994,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(8)", size: 8), converter: new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)), + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)))); + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)))); physicalAddressToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty", "TestNamespace") }); var physicalAddressToStringConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToStringConverterProperty", @@ -15246,20 +15025,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToStringConverter()); physicalAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance) == null); physicalAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( index: 220, originalValueIndex: 220, @@ -15268,32 +15047,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(20)", size: 20, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); physicalAddressToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - physicalAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty", "TestNamespace") }); var @string = runtimeEntityType.AddProperty( "String", @@ -15301,20 +15079,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("String", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<String>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @string.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance) == null); @string.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), - (ValueBuffer valueBuffer) => valueBuffer[221]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), + object (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( index: 221, originalValueIndex: 221, @@ -15323,24 +15101,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @string.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); @string.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - @string.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String", "TestNamespace") }); var stringArray = runtimeEntityType.AddProperty( "StringArray", @@ -15348,20 +15125,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance) == null); stringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), + object (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( index: 222, originalValueIndex: 222, @@ -15370,17 +15147,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15392,24 +15169,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - stringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray", "TestNamespace") }); var stringNestedCollection = runtimeEntityType.AddProperty( "StringNestedCollection", @@ -15417,20 +15193,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance) == null); stringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[223]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[223]); stringNestedCollection.SetPropertyIndexes( index: 223, originalValueIndex: 223, @@ -15439,17 +15215,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15463,17 +15239,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -15485,24 +15261,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (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); - stringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection", "TestNamespace") }); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -15511,20 +15286,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBoolConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToBoolConverter()); stringToBoolConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance) == null); stringToBoolConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( index: 224, originalValueIndex: 224, @@ -15533,27 +15308,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBoolConverterProperty.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), converter: new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)), + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, bool>( JsonBoolReaderWriter.Instance, new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)))); + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)))); stringToBoolConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToBoolConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty", "TestNamespace") }); var stringToBytesConverterProperty = runtimeEntityType.AddProperty( "StringToBytesConverterProperty", @@ -15562,20 +15336,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); stringToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance) == null); stringToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[225]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( index: 225, originalValueIndex: 225, @@ -15584,30 +15358,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), converter: new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, byte[]>( JsonByteArrayReaderWriter.Instance, new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); stringToBytesConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty", "TestNamespace") }); var stringToCharConverterProperty = runtimeEntityType.AddProperty( "StringToCharConverterProperty", @@ -15616,20 +15389,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToCharConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToCharConverter()); stringToCharConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance) == null); stringToCharConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[226]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( index: 226, originalValueIndex: 226, @@ -15638,32 +15411,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToCharConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(1)", size: 1, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<string, string>( - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0])), - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0]))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0])))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0]))))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0])), - (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)(v.Length < 1 ? '\0' : v[0]))))); + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0])))), + string (string v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)((v.Length < 1 ? '\0' : v[0]))))))); stringToCharConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToCharConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty", "TestNamespace") }); var stringToDateOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToDateOnlyConverterProperty", @@ -15672,20 +15444,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateOnlyConverter()); stringToDateOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance) == null); stringToDateOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[227]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( index: 227, originalValueIndex: 227, @@ -15694,29 +15466,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateOnlyConverterProperty.TypeMapping = SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateOnly>( JsonDateOnlyReaderWriter.Instance, new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); stringToDateOnlyConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty", "TestNamespace") }); var stringToDateTimeConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeConverterProperty", @@ -15725,20 +15496,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeConverter()); stringToDateTimeConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance) == null); stringToDateTimeConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[228]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( index: 228, originalValueIndex: 228, @@ -15747,29 +15518,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeConverterProperty.TypeMapping = SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTime>( JsonDateTimeReaderWriter.Instance, new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); stringToDateTimeConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateTimeConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty", "TestNamespace") }); var stringToDateTimeOffsetConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeOffsetConverterProperty", @@ -15778,20 +15548,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeOffsetConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeOffsetConverter()); stringToDateTimeOffsetConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance) == null); stringToDateTimeOffsetConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[229]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( index: 229, originalValueIndex: 229, @@ -15800,29 +15570,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeOffsetConverterProperty.TypeMapping = SqlServerDateTimeOffsetTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTimeOffset>( JsonDateTimeOffsetReaderWriter.Instance, new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); stringToDateTimeOffsetConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDateTimeOffsetConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty", "TestNamespace") }); var stringToDecimalNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDecimalNumberConverterProperty", @@ -15831,20 +15600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDecimalNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<decimal>()); stringToDecimalNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance) == null); stringToDecimalNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[230]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( index: 230, originalValueIndex: 230, @@ -15853,29 +15622,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDecimalNumberConverterProperty.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); stringToDecimalNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDecimalNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty", "TestNamespace") }); var stringToDoubleNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDoubleNumberConverterProperty", @@ -15884,20 +15652,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDoubleNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<double>()); stringToDoubleNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance) == null); stringToDoubleNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[231]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( index: 231, originalValueIndex: 231, @@ -15906,29 +15674,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDoubleNumberConverterProperty.TypeMapping = SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, double>( JsonDoubleReaderWriter.Instance, new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)))); + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))))); stringToDoubleNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToDoubleNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty", "TestNamespace") }); var stringToEnumConverterProperty = runtimeEntityType.AddProperty( "StringToEnumConverterProperty", @@ -15937,20 +15704,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToEnumConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToEnumConverter<CompiledModelTestBase.EnumU32>()); stringToEnumConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance) == null); stringToEnumConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[232]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( index: 232, originalValueIndex: 232, @@ -15959,27 +15726,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToEnumConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<string, long>( - (string v) => (long)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (long value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()), + long (string v) => ((long)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (long value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<string, long>( - (string v) => (long)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (long value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()))); + long (string v) => ((long)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (long value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()))); stringToEnumConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToEnumConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty", "TestNamespace") }); var stringToGuidConverterProperty = runtimeEntityType.AddProperty( "StringToGuidConverterProperty", @@ -15987,20 +15753,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToGuidConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToGuidConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringToGuidConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance) == null); stringToGuidConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[233]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( index: 233, originalValueIndex: 233, @@ -16009,24 +15775,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToGuidConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); stringToGuidConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToGuidConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty", "TestNamespace") }); var stringToIntNumberConverterProperty = runtimeEntityType.AddProperty( "StringToIntNumberConverterProperty", @@ -16035,20 +15800,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToIntNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<int>()); stringToIntNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance) == null); stringToIntNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[234]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( index: 234, originalValueIndex: 234, @@ -16057,29 +15822,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToIntNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); stringToIntNumberConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToIntNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty", "TestNamespace") }); var stringToTimeOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToTimeOnlyConverterProperty", @@ -16088,20 +15852,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeOnlyConverter()); stringToTimeOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance) == null); stringToTimeOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( index: 235, originalValueIndex: 235, @@ -16110,29 +15874,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeOnlyConverterProperty.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeOnly>( JsonTimeOnlyReaderWriter.Instance, new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")))); + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))))); stringToTimeOnlyConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToTimeOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty", "TestNamespace") }); var stringToTimeSpanConverterProperty = runtimeEntityType.AddProperty( "StringToTimeSpanConverterProperty", @@ -16141,20 +15904,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeSpanConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeSpanConverter()); stringToTimeSpanConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance) == null); stringToTimeSpanConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[236]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( index: 236, originalValueIndex: 236, @@ -16163,29 +15926,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeSpanConverterProperty.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeSpan>( JsonTimeSpanReaderWriter.Instance, new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")))); + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")))); stringToTimeSpanConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToTimeSpanConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty", "TestNamespace") }); var stringToUriConverterProperty = runtimeEntityType.AddProperty( "StringToUriConverterProperty", @@ -16194,20 +15956,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToUriConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToUriConverter()); stringToUriConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance) == null); stringToUriConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[237]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( index: 237, originalValueIndex: 237, @@ -16216,32 +15978,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToUriConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); stringToUriConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - stringToUriConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty", "TestNamespace") }); var timeOnly = runtimeEntityType.AddProperty( "TimeOnly", @@ -16250,20 +16011,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeOnly(0, 0, 0)); timeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance) == default(TimeOnly)); timeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[238]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( index: 238, originalValueIndex: 238, @@ -16272,19 +16033,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnly.TypeMapping = SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)); timeOnly.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly", "TestNamespace") }); var timeOnlyArray = runtimeEntityType.AddProperty( "TimeOnlyArray", @@ -16292,20 +16052,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance) == null); + TimeOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) == null, + TimeOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance) == null); timeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[239]); + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), + TimeOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( index: 239, originalValueIndex: 239, @@ -16314,17 +16074,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), keyComparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16336,19 +16096,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))); + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))); timeOnlyArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray", "TestNamespace") }); var timeOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToStringConverterProperty", @@ -16357,20 +16116,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToStringConverter()); timeOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); timeOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[240]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( index: 240, originalValueIndex: 240, @@ -16379,33 +16138,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); timeOnlyToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); timeOnlyToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty", "TestNamespace") }); var timeOnlyToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToTicksConverterProperty", @@ -16414,20 +16172,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToTicksConverter()); timeOnlyToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); timeOnlyToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[241]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( index: 241, originalValueIndex: 241, @@ -16436,28 +16194,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToTicksConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)), + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)))); + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)))); timeOnlyToTicksConverterProperty.SetSentinelFromProviderValue(0L); timeOnlyToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeOnlyToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty", "TestNamespace") }); var timeSpan = runtimeEntityType.AddProperty( "TimeSpan", @@ -16466,20 +16223,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeSpan(0, 0, 0, 0, 0)); timeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance) == default(TimeSpan)); timeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[242]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( index: 242, originalValueIndex: 242, @@ -16488,19 +16245,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpan.TypeMapping = SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)); timeSpan.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan", "TestNamespace") }); var timeSpanArray = runtimeEntityType.AddProperty( "TimeSpanArray", @@ -16508,20 +16264,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance) == null); + TimeSpan[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) == null, + TimeSpan[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance) == null); timeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[243]); + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), + TimeSpan[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( index: 243, originalValueIndex: 243, @@ -16530,17 +16286,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), keyComparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16552,19 +16308,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))); + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))); timeSpanArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray", "TestNamespace") }); var timeSpanToStringConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToStringConverterProperty", @@ -16573,20 +16328,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToStringConverter()); timeSpanToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); timeSpanToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[244]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( index: 244, originalValueIndex: 244, @@ -16595,33 +16350,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(48)", size: 48, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); timeSpanToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); timeSpanToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty", "TestNamespace") }); var timeSpanToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToTicksConverterProperty", @@ -16630,20 +16384,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToTicksConverter()); timeSpanToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); timeSpanToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[245]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( index: 245, originalValueIndex: 245, @@ -16652,28 +16406,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToTicksConverterProperty.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)), + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)))); + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)))); timeSpanToTicksConverterProperty.SetSentinelFromProviderValue(0L); timeSpanToTicksConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - timeSpanToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty", "TestNamespace") }); var uInt16 = runtimeEntityType.AddProperty( "UInt16", @@ -16681,20 +16434,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance) == 0); + ushort (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity) == 0, + ushort (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance) == 0); uInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[246]); + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), + ushort (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), + object (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( index: 246, originalValueIndex: 246, @@ -16703,28 +16456,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))); uInt16.SetSentinelFromProviderValue(0); uInt16.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16", "TestNamespace") }); var uInt16Array = runtimeEntityType.AddProperty( "UInt16Array", @@ -16732,20 +16484,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance) == null); + ushort[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity) == null, + ushort[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance) == null); uInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[247]); + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), + ushort[] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( index: 247, originalValueIndex: 247, @@ -16754,17 +16506,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), keyComparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16773,38 +16525,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v))), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v), + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ushort, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<ushort, int>( - (ushort v) => (int)v, - (int v) => (ushort)v)))); + int (ushort v) => ((int)(v)), + ushort (int v) => ((ushort)(v)))))); uInt16Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array", "TestNamespace") }); var uInt32 = runtimeEntityType.AddProperty( "UInt32", @@ -16812,20 +16563,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) == 0U, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance) == 0U); + uint (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity) == 0U, + uint (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance) == 0U); uInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[248]); + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), + uint (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), + object (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( index: 248, originalValueIndex: 248, @@ -16834,28 +16585,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))); uInt32.SetSentinelFromProviderValue(0L); uInt32.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32", "TestNamespace") }); var uInt32Array = runtimeEntityType.AddProperty( "UInt32Array", @@ -16863,20 +16613,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance) == null); + uint[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity) == null, + uint[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance) == null); uInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[249]); + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), + uint[] (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( index: 249, originalValueIndex: 249, @@ -16885,17 +16635,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), keyComparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -16904,38 +16654,37 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<uint[], uint>( new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v))), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))))), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), converter: new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v), + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<uint, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<uint, long>( - (uint v) => (long)v, - (long v) => (uint)v)))); + long (uint v) => ((long)(v)), + uint (long v) => ((uint)(v)))))); uInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array", "TestNamespace") }); var uInt64 = runtimeEntityType.AddProperty( "UInt64", @@ -16943,20 +16692,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) == 0UL, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance) == 0UL); + ulong (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity) == 0UL, + ulong (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance) == 0UL); uInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[250]); + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), + ulong (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), + object (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( index: 250, originalValueIndex: 250, @@ -16965,32 +16714,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64.TypeMapping = SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))); uInt64.SetSentinelFromProviderValue(0m); uInt64.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64", "TestNamespace") }); var uInt64Array = runtimeEntityType.AddProperty( "UInt64Array", @@ -16998,20 +16746,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance) == null); + ulong[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity) == null, + ulong[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance) == null); uInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[251]); + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), + ulong[] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( index: 251, originalValueIndex: 251, @@ -17020,17 +16768,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), keyComparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17039,42 +16787,41 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v))), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))))), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), keyComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "decimal(20,0)", precision: 20, scale: 0), converter: new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v), + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<ulong, decimal>( JsonDecimalReaderWriter.Instance, new ValueConverter<ulong, decimal>( - (ulong v) => (decimal)v, - (decimal v) => (ulong)v)))); + decimal (ulong v) => ((decimal)(v)), + ulong (decimal v) => ((ulong)(v)))))); uInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array", "TestNamespace") }); var uInt8 = runtimeEntityType.AddProperty( "UInt8", @@ -17083,20 +16830,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (byte)0); uInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance) == 0); + byte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity) == 0, + byte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance) == 0); uInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[252]); + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), + byte (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), + object (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( index: 252, originalValueIndex: 252, @@ -17105,19 +16852,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); uInt8.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8", "TestNamespace") }); var uInt8Array = runtimeEntityType.AddProperty( "UInt8Array", @@ -17125,20 +16871,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance) == null); uInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[253]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( index: 253, originalValueIndex: 253, @@ -17147,22 +16893,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8Array.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); uInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array", "TestNamespace") }); var uInt8NestedCollection = runtimeEntityType.AddProperty( "UInt8NestedCollection", @@ -17170,20 +16915,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance) == null); + List<byte[]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) == null, + List<byte[]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance) == null); uInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[254]); + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), + List<byte[]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[254]); uInt8NestedCollection.SetPropertyIndexes( index: 254, originalValueIndex: 254, @@ -17192,17 +16937,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17214,22 +16959,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None)); uInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection", "TestNamespace") }); var uri = runtimeEntityType.AddProperty( "Uri", @@ -17237,20 +16981,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Uri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Uri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance) == null); uri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), - (ValueBuffer valueBuffer) => valueBuffer[255]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), + object (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( index: 255, originalValueIndex: 255, @@ -17259,32 +17003,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uri.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); uri.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri", "TestNamespace") }); var uriArray = runtimeEntityType.AddProperty( "UriArray", @@ -17292,20 +17035,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance) == null); uriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[256]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), + object (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( index: 256, originalValueIndex: 256, @@ -17314,17 +17057,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -17333,43 +17076,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); uriArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray", "TestNamespace") }); var uriToStringConverterProperty = runtimeEntityType.AddProperty( "UriToStringConverterProperty", @@ -17378,20 +17120,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new UriToStringConverter()); uriToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance) == null); uriToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[257]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( index: 257, originalValueIndex: 257, @@ -17400,32 +17142,31 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriToStringConverterProperty.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); uriToStringConverterProperty.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - uriToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -17698,40 +17439,40 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<CompiledModelTestBase.ManyTypesId>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<CompiledModelTestBase.ManyTypesId>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)((IProperty)@bool).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(@bool)), (IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray) == null ? null : (bool[])((ValueComparer<IEnumerable<bool>>)((IProperty)boolArray).GetValueComparer()).Snapshot((IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray)), (object)source.GetCurrentValue<bool[][]>(boolNestedCollection) == null ? null : (bool[][])((ValueComparer<object>)((IProperty)boolNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<bool[][]>(boolNestedCollection)), ((ValueComparer<bool>)((IProperty)boolToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToTwoValuesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToZeroOneConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytes)), (object)source.GetCurrentValue<byte[][]>(bytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)bytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(bytesArray)), (object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)bytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection)), source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytesToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty)), ((ValueComparer<int>)((IProperty)castingConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)((IProperty)@char).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(@char)), (IEnumerable<char>)source.GetCurrentValue<char[]>(charArray) == null ? null : (char[])((ValueComparer<IEnumerable<char>>)((IProperty)charArray).GetValueComparer()).Snapshot((IEnumerable<char>)source.GetCurrentValue<char[]>(charArray)), (object)source.GetCurrentValue<char[][]>(charNestedCollection) == null ? null : (char[][])((ValueComparer<object>)((IProperty)charNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<char[][]>(charNestedCollection)), ((ValueComparer<char>)((IProperty)charToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)((IProperty)dateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer<IEnumerable<DateOnly>>)((IProperty)dateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray)), ((ValueComparer<DateOnly>)((IProperty)dateOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)dateTimeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)((IProperty)@decimal).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray) == null ? null : (decimal[])((ValueComparer<IEnumerable<decimal>>)((IProperty)decimalArray).GetValueComparer()).Snapshot((IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray)), ((ValueComparer<decimal>)((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))); - var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)((IProperty)decimalNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)((IProperty)@double).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(@double)), (IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray) == null ? null : (double[])((ValueComparer<IEnumerable<double>>)((IProperty)doubleArray).GetValueComparer()).Snapshot((IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray)), ((ValueComparer<double>)((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)((IProperty)doubleNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection)), (object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection) == null ? null : (List<CompiledModelTestBase.Enum32>[][])((ValueComparer<object>)((IProperty)enum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))); - var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer<object>)((IProperty)enum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection)), (object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer<object>)((IProperty)enumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection)), ((ValueComparer<float>)((IProperty)@float).GetValueComparer()).Snapshot(source.GetCurrentValue<float>(@float)), (IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray) == null ? null : (float[])((ValueComparer<IEnumerable<float>>)((IProperty)floatArray).GetValueComparer()).Snapshot((IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray))); - var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, Nullable<int>, Nullable<bool>, Nullable<bool>[], byte[], byte[][], byte[][][], Nullable<char>, Nullable<char>[]>(((ValueComparer<Guid>)((IProperty)guid).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guid)), (IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray) == null ? null : (Guid[])((ValueComparer<IEnumerable<Guid>>)((IProperty)guidArray).GetValueComparer()).Snapshot((IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray)), (object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection) == null ? null : (ICollection<Guid[][]>)((ValueComparer<object>)((IProperty)guidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection)), ((ValueComparer<Guid>)((IProperty)guidToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)((IProperty)guidToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress)), (object)source.GetCurrentValue<IPAddress[]>(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)iPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(iPAddressArray)), source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty)), ((ValueComparer<short>)((IProperty)int16).GetValueComparer()).Snapshot(source.GetCurrentValue<short>(int16)), (IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array) == null ? null : (short[])((ValueComparer<IEnumerable<short>>)((IProperty)int16Array).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array)), ((ValueComparer<int>)((IProperty)int32).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(int32)), (IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array) == null ? null : (int[])((ValueComparer<IEnumerable<int>>)((IProperty)int32Array).GetValueComparer()).Snapshot((IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array)), (object)source.GetCurrentValue<int[][]>(int32NestedCollection) == null ? null : (int[][])((ValueComparer<object>)((IProperty)int32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<int[][]>(int32NestedCollection)), ((ValueComparer<long>)((IProperty)int64).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(int64)), (IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array) == null ? null : (long[])((ValueComparer<IEnumerable<long>>)((IProperty)int64Array).GetValueComparer()).Snapshot((IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array)), (object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection) == null ? null : (IList<long[]>[])((ValueComparer<object>)((IProperty)int64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection)), ((ValueComparer<sbyte>)((IProperty)int8).GetValueComparer()).Snapshot(source.GetCurrentValue<sbyte>(int8)), (IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array) == null ? null : (sbyte[])((ValueComparer<IEnumerable<sbyte>>)((IProperty)int8Array).GetValueComparer()).Snapshot((IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array)), (object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer<object>)((IProperty)int8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection)), ((ValueComparer<int>)((IProperty)intNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)((IProperty)intNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullIntToNullStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty)), source.GetCurrentValue<Nullable<bool>>(nullableBool) == null ? null : ((ValueComparer<Nullable<bool>>)((IProperty)nullableBool).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<bool>>(nullableBool)), (IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray) == null ? null : (Nullable<bool>[])((ValueComparer<IEnumerable<Nullable<bool>>>)((IProperty)nullableBoolArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray)), source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)nullableBytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes)), (object)source.GetCurrentValue<byte[][]>(nullableBytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)nullableBytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(nullableBytesArray)), (object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)nullableBytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection)), source.GetCurrentValue<Nullable<char>>(nullableChar) == null ? null : ((ValueComparer<Nullable<char>>)((IProperty)nullableChar).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<char>>(nullableChar)), (IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray) == null ? null : (Nullable<char>[])((ValueComparer<IEnumerable<Nullable<char>>>)((IProperty)nullableCharArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray))); - var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot<Nullable<DateOnly>, Nullable<DateOnly>[], Nullable<DateTime>, Nullable<DateTime>[], Nullable<decimal>, Nullable<decimal>[], Nullable<double>, Nullable<double>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], List<Nullable<CompiledModelTestBase.Enum16>>, List<Nullable<CompiledModelTestBase.Enum16>>, Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], List<Nullable<CompiledModelTestBase.Enum32>>, List<Nullable<CompiledModelTestBase.Enum32>>, Nullable<CompiledModelTestBase.Enum32>[][][], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], List<Nullable<CompiledModelTestBase.Enum64>>, List<Nullable<CompiledModelTestBase.Enum64>>, Nullable<CompiledModelTestBase.Enum8>, Nullable<CompiledModelTestBase.Enum8>[], Nullable<CompiledModelTestBase.Enum8>>(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly) == null ? null : ((ValueComparer<Nullable<DateOnly>>)((IProperty)nullableDateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly)), (IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray) == null ? null : (Nullable<DateOnly>[])((ValueComparer<IEnumerable<Nullable<DateOnly>>>)((IProperty)nullableDateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray)), source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime) == null ? null : ((ValueComparer<Nullable<DateTime>>)((IProperty)nullableDateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime)), (IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray) == null ? null : (Nullable<DateTime>[])((ValueComparer<IEnumerable<Nullable<DateTime>>>)((IProperty)nullableDateTimeArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray)), source.GetCurrentValue<Nullable<decimal>>(nullableDecimal) == null ? null : ((ValueComparer<Nullable<decimal>>)((IProperty)nullableDecimal).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<decimal>>(nullableDecimal)), (IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray) == null ? null : (Nullable<decimal>[])((ValueComparer<IEnumerable<Nullable<decimal>>>)((IProperty)nullableDecimalArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray)), source.GetCurrentValue<Nullable<double>>(nullableDouble) == null ? null : ((ValueComparer<Nullable<double>>)((IProperty)nullableDouble).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<double>>(nullableDouble)), (IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray) == null ? null : (Nullable<double>[])((ValueComparer<IEnumerable<Nullable<double>>>)((IProperty)nullableDoubleArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[][][])((ValueComparer<object>)((IProperty)nullableEnum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString))); - var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot<Nullable<CompiledModelTestBase.Enum8>[], List<Nullable<CompiledModelTestBase.Enum8>>, List<Nullable<CompiledModelTestBase.Enum8>>, Nullable<CompiledModelTestBase.Enum8>[][], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], List<Nullable<CompiledModelTestBase.EnumU16>>, List<Nullable<CompiledModelTestBase.EnumU16>>, Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], List<Nullable<CompiledModelTestBase.EnumU32>>, List<Nullable<CompiledModelTestBase.EnumU32>>, Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], List<Nullable<CompiledModelTestBase.EnumU64>>, List<Nullable<CompiledModelTestBase.EnumU64>>, Nullable<CompiledModelTestBase.EnumU64>[][], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], List<Nullable<CompiledModelTestBase.EnumU8>>, List<Nullable<CompiledModelTestBase.EnumU8>>, Nullable<float>>((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[][])((ValueComparer<object>)((IProperty)nullableEnum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[][])((ValueComparer<object>)((IProperty)nullableEnumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection)), source.GetCurrentValue<Nullable<float>>(nullableFloat) == null ? null : ((ValueComparer<Nullable<float>>)((IProperty)nullableFloat).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<float>>(nullableFloat))); - var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot<Nullable<float>[], Nullable<Guid>, Nullable<Guid>[], Nullable<Guid>[][], IPAddress, IPAddress[], Nullable<short>, Nullable<short>[], Nullable<int>, Nullable<int>[], Nullable<int>[][], Nullable<long>, Nullable<long>[], List<Nullable<long>[][]>, Nullable<sbyte>, Nullable<sbyte>[], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], Nullable<TimeOnly>, Nullable<TimeOnly>[], Nullable<TimeSpan>, Nullable<TimeSpan>[], Nullable<ushort>, Nullable<ushort>[], Nullable<uint>, Nullable<uint>[]>((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray) == null ? null : (Nullable<float>[])((ValueComparer<IEnumerable<Nullable<float>>>)((IProperty)nullableFloatArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray)), source.GetCurrentValue<Nullable<Guid>>(nullableGuid) == null ? null : ((ValueComparer<Nullable<Guid>>)((IProperty)nullableGuid).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<Guid>>(nullableGuid)), (IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray) == null ? null : (Nullable<Guid>[])((ValueComparer<IEnumerable<Nullable<Guid>>>)((IProperty)nullableGuidArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray)), (object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection) == null ? null : (Nullable<Guid>[][])((ValueComparer<object>)((IProperty)nullableGuidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection)), source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)nullableIPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress)), (object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)nullableIPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray)), source.GetCurrentValue<Nullable<short>>(nullableInt16) == null ? null : ((ValueComparer<Nullable<short>>)((IProperty)nullableInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<short>>(nullableInt16)), (IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array) == null ? null : (Nullable<short>[])((ValueComparer<IEnumerable<Nullable<short>>>)((IProperty)nullableInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array)), source.GetCurrentValue<Nullable<int>>(nullableInt32) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullableInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullableInt32)), (IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array) == null ? null : (Nullable<int>[])((ValueComparer<IEnumerable<Nullable<int>>>)((IProperty)nullableInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array)), (object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection) == null ? null : (Nullable<int>[][])((ValueComparer<object>)((IProperty)nullableInt32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection)), source.GetCurrentValue<Nullable<long>>(nullableInt64) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)nullableInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(nullableInt64)), (IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array) == null ? null : (Nullable<long>[])((ValueComparer<IEnumerable<Nullable<long>>>)((IProperty)nullableInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array)), (object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection) == null ? null : (List<Nullable<long>[][]>)((ValueComparer<object>)((IProperty)nullableInt64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue<Nullable<sbyte>>(nullableInt8) == null ? null : ((ValueComparer<Nullable<sbyte>>)((IProperty)nullableInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<sbyte>>(nullableInt8)), (IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array) == null ? null : (Nullable<sbyte>[])((ValueComparer<IEnumerable<Nullable<sbyte>>>)((IProperty)nullableInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array)), source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)nullablePhysicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)nullablePhysicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray)), (object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable<PhysicalAddress[][]>)((ValueComparer<object>)((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)((IProperty)nullableString).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(nullableString)), (object)source.GetCurrentValue<string[]>(nullableStringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)nullableStringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(nullableStringArray)), (object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)nullableStringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection)), source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly) == null ? null : ((ValueComparer<Nullable<TimeOnly>>)((IProperty)nullableTimeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly)), (IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray) == null ? null : (Nullable<TimeOnly>[])((ValueComparer<IEnumerable<Nullable<TimeOnly>>>)((IProperty)nullableTimeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray)), source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan) == null ? null : ((ValueComparer<Nullable<TimeSpan>>)((IProperty)nullableTimeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan)), (IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray) == null ? null : (Nullable<TimeSpan>[])((ValueComparer<IEnumerable<Nullable<TimeSpan>>>)((IProperty)nullableTimeSpanArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray)), source.GetCurrentValue<Nullable<ushort>>(nullableUInt16) == null ? null : ((ValueComparer<Nullable<ushort>>)((IProperty)nullableUInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ushort>>(nullableUInt16)), (IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array) == null ? null : (Nullable<ushort>[])((ValueComparer<IEnumerable<Nullable<ushort>>>)((IProperty)nullableUInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array)), source.GetCurrentValue<Nullable<uint>>(nullableUInt32) == null ? null : ((ValueComparer<Nullable<uint>>)((IProperty)nullableUInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<uint>>(nullableUInt32)), (IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array) == null ? null : (Nullable<uint>[])((ValueComparer<IEnumerable<Nullable<uint>>>)((IProperty)nullableUInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array))); - var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg6 = (ISnapshot)new Snapshot<Nullable<ulong>, Nullable<ulong>[], Nullable<byte>, Nullable<byte>[], Nullable<byte>[][], 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<Nullable<ulong>>(nullableUInt64) == null ? null : ((ValueComparer<Nullable<ulong>>)((IProperty)nullableUInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ulong>>(nullableUInt64)), (IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array) == null ? null : (Nullable<ulong>[])((ValueComparer<IEnumerable<Nullable<ulong>>>)((IProperty)nullableUInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array)), source.GetCurrentValue<Nullable<byte>>(nullableUInt8) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)nullableUInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(nullableUInt8)), (IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array) == null ? null : (Nullable<byte>[])((ValueComparer<IEnumerable<Nullable<byte>>>)((IProperty)nullableUInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array)), (object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable<byte>[][])((ValueComparer<object>)((IProperty)nullableUInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)((IProperty)nullableUri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(nullableUri)), (object)source.GetCurrentValue<Uri[]>(nullableUriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)nullableUriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(nullableUriArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)physicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty)), source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)((IProperty)@string).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(@string)), (object)source.GetCurrentValue<string[]>(stringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)stringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(stringArray)), (object)source.GetCurrentValue<string[][]>(stringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)stringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(stringNestedCollection)), source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBoolConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty)), source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty)), source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToCharConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty)), source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty)), source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty)), source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToEnumConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty)), source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToGuidConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty)), source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToIntNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty)), source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty)), source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeSpanConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty)), source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToUriConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer<IEnumerable<TimeOnly>>)((IProperty)timeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))); - var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)((IProperty)timeOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer<IEnumerable<TimeSpan>>)((IProperty)timeSpanArray).GetValueComparer()).Snapshot((IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)((IProperty)uInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array) == null ? null : (ushort[])((ValueComparer<IEnumerable<ushort>>)((IProperty)uInt16Array).GetValueComparer()).Snapshot((IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array)), ((ValueComparer<uint>)((IProperty)uInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<uint>(uInt32)), (IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array) == null ? null : (uint[])((ValueComparer<IEnumerable<uint>>)((IProperty)uInt32Array).GetValueComparer()).Snapshot((IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array)), ((ValueComparer<ulong>)((IProperty)uInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array) == null ? null : (ulong[])((ValueComparer<IEnumerable<ulong>>)((IProperty)uInt64Array).GetValueComparer()).Snapshot((IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array)), ((ValueComparer<byte>)((IProperty)uInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<byte>(uInt8)), source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)((IProperty)uInt8Array).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array)), (object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection) == null ? null : (List<byte[]>)((ValueComparer<object>)((IProperty)uInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection)), source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)((IProperty)uri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uri)), (object)source.GetCurrentValue<Uri[]>(uriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)uriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(uriArray)), source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)((IProperty)uriToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty))) }); + var entity = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)(((IProperty)@bool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(@bool)), (((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))) == null ? null : ((bool[])(((ValueComparer<IEnumerable<bool>>)(((IProperty)boolArray).GetValueComparer())).Snapshot(((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))))))), (((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))) == null ? null : ((bool[][])(((ValueComparer<object>)(((IProperty)boolNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))))))), ((ValueComparer<bool>)(((IProperty)boolToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToTwoValuesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToZeroOneConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), (source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytes))), (((object)(source.GetCurrentValue<byte[][]>(bytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)bytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(bytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)bytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))))))), (source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytesToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty))), ((ValueComparer<int>)(((IProperty)castingConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)(((IProperty)@char).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(@char)), (((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))) == null ? null : ((char[])(((ValueComparer<IEnumerable<char>>)(((IProperty)charArray).GetValueComparer())).Snapshot(((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))))))), (((object)(source.GetCurrentValue<char[][]>(charNestedCollection))) == null ? null : ((char[][])(((ValueComparer<object>)(((IProperty)charNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<char[][]>(charNestedCollection))))))), ((ValueComparer<char>)(((IProperty)charToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)(((IProperty)dateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))) == null ? null : ((DateOnly[])(((ValueComparer<IEnumerable<DateOnly>>)(((IProperty)dateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))))))), ((ValueComparer<DateOnly>)(((IProperty)dateOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)dateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))))))), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)(((IProperty)@decimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))) == null ? null : ((decimal[])(((ValueComparer<IEnumerable<decimal>>)(((IProperty)decimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))))))), ((ValueComparer<decimal>)(((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))))); + var entity0 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)(((IProperty)decimalNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)(((IProperty)@double).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(@double)), (((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))) == null ? null : ((double[])(((ValueComparer<IEnumerable<double>>)(((IProperty)doubleArray).GetValueComparer())).Snapshot(((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))))))), ((ValueComparer<double>)(((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)(((IProperty)doubleNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))))))), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))))))), (((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>[][])(((ValueComparer<object>)(((IProperty)enum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection)))))))))); + var entity1 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg1 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8[][])(((ValueComparer<object>)(((IProperty)enum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64[][])(((ValueComparer<object>)(((IProperty)enumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))))))), ((ValueComparer<float>)(((IProperty)@float).GetValueComparer())).Snapshot(source.GetCurrentValue<float>(@float)), (((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray))) == null ? null : ((float[])(((ValueComparer<IEnumerable<float>>)(((IProperty)floatArray).GetValueComparer())).Snapshot(((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray)))))))))); + var entity2 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg2 = ((ISnapshot)(new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, int?, bool?, bool? [], byte[], byte[][], byte[][][], char?, char? []>(((ValueComparer<Guid>)(((IProperty)guid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guid)), (((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))) == null ? null : ((Guid[])(((ValueComparer<IEnumerable<Guid>>)(((IProperty)guidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))))))), (((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))) == null ? null : ((ICollection<Guid[][]>)(((ValueComparer<object>)(((IProperty)guidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))))))), ((ValueComparer<Guid>)(((IProperty)guidToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)(((IProperty)guidToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), (source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)iPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))))))), (source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty))), (source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty))), ((ValueComparer<short>)(((IProperty)int16).GetValueComparer())).Snapshot(source.GetCurrentValue<short>(int16)), (((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))) == null ? null : ((short[])(((ValueComparer<IEnumerable<short>>)(((IProperty)int16Array).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))))))), ((ValueComparer<int>)(((IProperty)int32).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(int32)), (((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))) == null ? null : ((int[])(((ValueComparer<IEnumerable<int>>)(((IProperty)int32Array).GetValueComparer())).Snapshot(((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))))))), (((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))) == null ? null : ((int[][])(((ValueComparer<object>)(((IProperty)int32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))))))), ((ValueComparer<long>)(((IProperty)int64).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(int64)), (((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))) == null ? null : ((long[])(((ValueComparer<IEnumerable<long>>)(((IProperty)int64Array).GetValueComparer())).Snapshot(((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))))))), (((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))) == null ? null : ((IList<long[]>[])(((ValueComparer<object>)(((IProperty)int64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))))))), ((ValueComparer<sbyte>)(((IProperty)int8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte>(int8)), (((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))) == null ? null : ((sbyte[])(((ValueComparer<IEnumerable<sbyte>>)(((IProperty)int8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))))))), (((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))) == null ? null : ((sbyte[][][])(((ValueComparer<object>)(((IProperty)int8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))))))), ((ValueComparer<int>)(((IProperty)intNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)(((IProperty)intNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), (source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<int?>)(((IProperty)nullIntToNullStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty))), (source.GetCurrentValue<bool?>(nullableBool) == null ? null : ((ValueComparer<bool?>)(((IProperty)nullableBool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool?>(nullableBool))), (((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))) == null ? null : ((bool? [])(((ValueComparer<IEnumerable<bool?>>)(((IProperty)nullableBoolArray).GetValueComparer())).Snapshot(((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))))))), (source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)nullableBytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes))), (((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)nullableBytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)nullableBytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))))))), (source.GetCurrentValue<char?>(nullableChar) == null ? null : ((ValueComparer<char?>)(((IProperty)nullableChar).GetValueComparer())).Snapshot(source.GetCurrentValue<char?>(nullableChar))), (((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray))) == null ? null : ((char? [])(((ValueComparer<IEnumerable<char?>>)(((IProperty)nullableCharArray).GetValueComparer())).Snapshot(((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray)))))))))); + var entity3 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg3 = ((ISnapshot)(new Snapshot<DateOnly?, DateOnly? [], DateTime?, DateTime? [], decimal?, decimal? [], double?, double? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], List<CompiledModelTestBase.Enum16?>, List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], List<CompiledModelTestBase.Enum32?>, List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32? [][][], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], List<CompiledModelTestBase.Enum64?>, List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum8?, CompiledModelTestBase.Enum8? [], CompiledModelTestBase.Enum8?>((source.GetCurrentValue<DateOnly?>(nullableDateOnly) == null ? null : ((ValueComparer<DateOnly?>)(((IProperty)nullableDateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly?>(nullableDateOnly))), (((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))) == null ? null : ((DateOnly? [])(((ValueComparer<IEnumerable<DateOnly?>>)(((IProperty)nullableDateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))))))), (source.GetCurrentValue<DateTime?>(nullableDateTime) == null ? null : ((ValueComparer<DateTime?>)(((IProperty)nullableDateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime?>(nullableDateTime))), (((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))) == null ? null : ((DateTime? [])(((ValueComparer<IEnumerable<DateTime?>>)(((IProperty)nullableDateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))))))), (source.GetCurrentValue<decimal?>(nullableDecimal) == null ? null : ((ValueComparer<decimal?>)(((IProperty)nullableDecimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal?>(nullableDecimal))), (((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))) == null ? null : ((decimal? [])(((ValueComparer<IEnumerable<decimal?>>)(((IProperty)nullableDecimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))))))), (source.GetCurrentValue<double?>(nullableDouble) == null ? null : ((ValueComparer<double?>)(((IProperty)nullableDouble).GetValueComparer())).Snapshot(source.GetCurrentValue<double?>(nullableDouble))), (((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))) == null ? null : ((double? [])(((ValueComparer<IEnumerable<double?>>)(((IProperty)nullableDoubleArray).GetValueComparer())).Snapshot(((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum32? [][][])(((ValueComparer<object>)(((IProperty)nullableEnum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString)))))); + var entity4 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg4 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8? [], List<CompiledModelTestBase.Enum8?>, List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8? [][], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], List<CompiledModelTestBase.EnumU16?>, List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], List<CompiledModelTestBase.EnumU32?>, List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], List<CompiledModelTestBase.EnumU64?>, List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64? [][], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], List<CompiledModelTestBase.EnumU8?>, List<CompiledModelTestBase.EnumU8?>, float?>((((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8? [][])(((ValueComparer<object>)(((IProperty)nullableEnum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64? [][])(((ValueComparer<object>)(((IProperty)nullableEnumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))))))), (source.GetCurrentValue<float?>(nullableFloat) == null ? null : ((ValueComparer<float?>)(((IProperty)nullableFloat).GetValueComparer())).Snapshot(source.GetCurrentValue<float?>(nullableFloat)))))); + var entity5 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg5 = ((ISnapshot)(new Snapshot<float? [], Guid?, Guid? [], Guid? [][], IPAddress, IPAddress[], short?, short? [], int?, int? [], int? [][], long?, long? [], List<long? [][]>, sbyte?, sbyte? [], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], TimeOnly?, TimeOnly? [], TimeSpan?, TimeSpan? [], ushort?, ushort? [], uint?, uint? []>((((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))) == null ? null : ((float? [])(((ValueComparer<IEnumerable<float?>>)(((IProperty)nullableFloatArray).GetValueComparer())).Snapshot(((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))))))), (source.GetCurrentValue<Guid?>(nullableGuid) == null ? null : ((ValueComparer<Guid?>)(((IProperty)nullableGuid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid?>(nullableGuid))), (((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))) == null ? null : ((Guid? [])(((ValueComparer<IEnumerable<Guid?>>)(((IProperty)nullableGuidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))))))), (((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))) == null ? null : ((Guid? [][])(((ValueComparer<object>)(((IProperty)nullableGuidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))))))), (source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)nullableIPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)nullableIPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))))))), (source.GetCurrentValue<short?>(nullableInt16) == null ? null : ((ValueComparer<short?>)(((IProperty)nullableInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<short?>(nullableInt16))), (((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))) == null ? null : ((short? [])(((ValueComparer<IEnumerable<short?>>)(((IProperty)nullableInt16Array).GetValueComparer())).Snapshot(((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))))))), (source.GetCurrentValue<int?>(nullableInt32) == null ? null : ((ValueComparer<int?>)(((IProperty)nullableInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullableInt32))), (((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))) == null ? null : ((int? [])(((ValueComparer<IEnumerable<int?>>)(((IProperty)nullableInt32Array).GetValueComparer())).Snapshot(((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))))))), (((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))) == null ? null : ((int? [][])(((ValueComparer<object>)(((IProperty)nullableInt32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))))))), (source.GetCurrentValue<long?>(nullableInt64) == null ? null : ((ValueComparer<long?>)(((IProperty)nullableInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(nullableInt64))), (((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))) == null ? null : ((long? [])(((ValueComparer<IEnumerable<long?>>)(((IProperty)nullableInt64Array).GetValueComparer())).Snapshot(((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))))))), (((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))) == null ? null : ((List<long? [][]>)(((ValueComparer<object>)(((IProperty)nullableInt64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))))))), (source.GetCurrentValue<sbyte?>(nullableInt8) == null ? null : ((ValueComparer<sbyte?>)(((IProperty)nullableInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte?>(nullableInt8))), (((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))) == null ? null : ((sbyte? [])(((ValueComparer<IEnumerable<sbyte?>>)(((IProperty)nullableInt8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))))))), (source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)nullablePhysicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))))))), (((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))) == null ? null : ((IEnumerable<PhysicalAddress[][]>)(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))))))), (source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)(((IProperty)nullableString).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(nullableString))), (((object)(source.GetCurrentValue<string[]>(nullableStringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)nullableStringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(nullableStringArray))))))), (((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)nullableStringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))))))), (source.GetCurrentValue<TimeOnly?>(nullableTimeOnly) == null ? null : ((ValueComparer<TimeOnly?>)(((IProperty)nullableTimeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly?>(nullableTimeOnly))), (((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))) == null ? null : ((TimeOnly? [])(((ValueComparer<IEnumerable<TimeOnly?>>)(((IProperty)nullableTimeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))))))), (source.GetCurrentValue<TimeSpan?>(nullableTimeSpan) == null ? null : ((ValueComparer<TimeSpan?>)(((IProperty)nullableTimeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan?>(nullableTimeSpan))), (((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))) == null ? null : ((TimeSpan? [])(((ValueComparer<IEnumerable<TimeSpan?>>)(((IProperty)nullableTimeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))))))), (source.GetCurrentValue<ushort?>(nullableUInt16) == null ? null : ((ValueComparer<ushort?>)(((IProperty)nullableUInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort?>(nullableUInt16))), (((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))) == null ? null : ((ushort? [])(((ValueComparer<IEnumerable<ushort?>>)(((IProperty)nullableUInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))))))), (source.GetCurrentValue<uint?>(nullableUInt32) == null ? null : ((ValueComparer<uint?>)(((IProperty)nullableUInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint?>(nullableUInt32))), (((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array))) == null ? null : ((uint? [])(((ValueComparer<IEnumerable<uint?>>)(((IProperty)nullableUInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array)))))))))); + var entity6 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg6 = ((ISnapshot)(new Snapshot<ulong?, ulong? [], byte?, byte? [], byte? [][], 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<ulong?>(nullableUInt64) == null ? null : ((ValueComparer<ulong?>)(((IProperty)nullableUInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong?>(nullableUInt64))), (((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))) == null ? null : ((ulong? [])(((ValueComparer<IEnumerable<ulong?>>)(((IProperty)nullableUInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))))))), (source.GetCurrentValue<byte?>(nullableUInt8) == null ? null : ((ValueComparer<byte?>)(((IProperty)nullableUInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(nullableUInt8))), (((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))) == null ? null : ((byte? [])(((ValueComparer<IEnumerable<byte?>>)(((IProperty)nullableUInt8Array).GetValueComparer())).Snapshot(((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))))))), (((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))) == null ? null : ((byte? [][])(((ValueComparer<object>)(((IProperty)nullableUInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)(((IProperty)nullableUri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(nullableUri))), (((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)nullableUriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)physicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty))), (source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)(((IProperty)@string).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(@string))), (((object)(source.GetCurrentValue<string[]>(stringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)stringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(stringArray))))))), (((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)stringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))))))), (source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBoolConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty))), (source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty))), (source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToCharConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty))), (source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty))), (source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty))), (source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty))), (source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToEnumConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty))), (source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToGuidConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty))), (source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToIntNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty))), (source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeSpanConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty))), (source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToUriConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty))), ((ValueComparer<TimeOnly>)(((IProperty)timeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))) == null ? null : ((TimeOnly[])(((ValueComparer<IEnumerable<TimeOnly>>)(((IProperty)timeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray)))))))))); + var entity7 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, ((ISnapshot)(new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))) == null ? null : ((TimeSpan[])(((ValueComparer<IEnumerable<TimeSpan>>)(((IProperty)timeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))))))), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)(((IProperty)uInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))) == null ? null : ((ushort[])(((ValueComparer<IEnumerable<ushort>>)(((IProperty)uInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))))))), ((ValueComparer<uint>)(((IProperty)uInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint>(uInt32)), (((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))) == null ? null : ((uint[])(((ValueComparer<IEnumerable<uint>>)(((IProperty)uInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))))))), ((ValueComparer<ulong>)(((IProperty)uInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))) == null ? null : ((ulong[])(((ValueComparer<IEnumerable<ulong>>)(((IProperty)uInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))))))), ((ValueComparer<byte>)(((IProperty)uInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte>(uInt8)), (source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)(((IProperty)uInt8Array).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array))), (((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))) == null ? null : ((List<byte[]>)(((ValueComparer<object>)(((IProperty)uInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)(((IProperty)uri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uri))), (((object)(source.GetCurrentValue<Uri[]>(uriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)uriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(uriArray))))))), (source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)(((IProperty)uriToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty)))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(default(CompiledModelTestBase.ManyTypesId)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))); + var entity8 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 258, @@ -17752,779 +17493,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref CompiledModelTestBase.ManyTypesId UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] - public static extern ref bool[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] - public static extern ref bool[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] - public static extern ref char[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] - public static extern ref char[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] - public static extern ref DateOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] - public static extern ref decimal[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] - public static extern ref double[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32>[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] - public static extern ref float UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] - public static extern ref float[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] - public static extern ref Guid[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] - public static extern ref ICollection<Guid[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] - public static extern ref short UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] - public static extern ref short[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] - public static extern ref int[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] - public static extern ref int[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] - public static extern ref long[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] - public static extern ref IList<long[]>[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] - public static extern ref sbyte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] - public static extern ref sbyte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] - public static extern ref sbyte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] - public static extern ref bool? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] - public static extern ref bool?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] - public static extern ref char? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] - public static extern ref char?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] - public static extern ref DateOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] - public static extern ref DateOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] - public static extern ref DateTime? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] - public static extern ref DateTime?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] - public static extern ref decimal? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] - public static extern ref decimal?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] - public static extern ref double? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] - public static extern ref double?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] - public static extern ref float? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] - public static extern ref float?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] - public static extern ref Guid? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] - public static extern ref Guid?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] - public static extern ref Guid?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] - public static extern ref short? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] - public static extern ref short?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] - public static extern ref int?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] - public static extern ref int?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] - public static extern ref long?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] - public static extern ref List<long?[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] - public static extern ref sbyte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] - public static extern ref sbyte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] - public static extern ref IEnumerable<PhysicalAddress[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] - public static extern ref TimeOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] - public static extern ref TimeSpan? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] - public static extern ref TimeSpan?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] - public static extern ref ushort? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] - public static extern ref ushort?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] - public static extern ref uint? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] - public static extern ref uint?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] - public static extern ref ulong? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] - public static extern ref ulong?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] - public static extern ref byte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] - public static extern ref byte?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] - public static extern ref TimeSpan[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] - public static extern ref ushort UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] - public static extern ref ushort[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] - public static extern ref uint UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] - public static extern ref uint[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] - public static extern ref ulong UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] - public static extern ref ulong[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] - public static extern ref byte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] - public static extern ref List<byte[]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs new file mode 100644 index 00000000000..a7f933eb3fd --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs @@ -0,0 +1,790 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class ManyTypesUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref CompiledModelTestBase.ManyTypesId Id(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] + public static extern ref bool Bool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] + public static extern ref bool[] BoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] + public static extern ref bool[][] BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] + public static extern ref bool BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] + public static extern ref bool BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] + public static extern ref bool BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] + public static extern ref byte[] Bytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] + public static extern ref byte[][] BytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] + public static extern ref byte[] BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] + public static extern ref int CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] + public static extern ref char Char(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] + public static extern ref char[] CharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] + public static extern ref char[][] CharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] + public static extern ref char CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] + public static extern ref DateOnly DateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] + public static extern ref DateOnly[] DateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] + public static extern ref DateOnly DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] + public static extern ref DateTime DateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] + public static extern ref DateTime[] DateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] + public static extern ref decimal Decimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] + public static extern ref decimal[] DecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] + public static extern ref double Double(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] + public static extern ref double[] DoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32>[][] Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[][] Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[][] EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] + public static extern ref float Float(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] + public static extern ref float[] FloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] + public static extern ref Guid Guid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] + public static extern ref Guid[] GuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] + public static extern ref ICollection<Guid[][]> GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] + public static extern ref Guid GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] + public static extern ref Guid GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] + public static extern ref IPAddress IPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] + public static extern ref IPAddress[] IPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] + public static extern ref short Int16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] + public static extern ref short[] Int16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] + public static extern ref int Int32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] + public static extern ref int[] Int32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] + public static extern ref int[][] Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] + public static extern ref long Int64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] + public static extern ref long[] Int64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] + public static extern ref IList<long[]>[] Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] + public static extern ref sbyte Int8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] + public static extern ref sbyte[] Int8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] + public static extern ref sbyte[][][] Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] + public static extern ref int IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] + public static extern ref int IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] + public static extern ref int? NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] + public static extern ref bool? NullableBool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] + public static extern ref bool?[] NullableBoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] + public static extern ref byte[] NullableBytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] + public static extern ref byte[][] NullableBytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] + public static extern ref char? NullableChar(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] + public static extern ref char?[] NullableCharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] + public static extern ref DateOnly? NullableDateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] + public static extern ref DateOnly?[] NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] + public static extern ref DateTime? NullableDateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] + public static extern ref DateTime?[] NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] + public static extern ref decimal? NullableDecimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] + public static extern ref decimal?[] NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] + public static extern ref double? NullableDouble(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] + public static extern ref double?[] NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[][][] NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[][] NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[][] NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] + public static extern ref float? NullableFloat(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] + public static extern ref float?[] NullableFloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] + public static extern ref Guid? NullableGuid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] + public static extern ref Guid?[] NullableGuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] + public static extern ref Guid?[][] NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] + public static extern ref IPAddress NullableIPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] + public static extern ref IPAddress[] NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] + public static extern ref short? NullableInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] + public static extern ref short?[] NullableInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] + public static extern ref int? NullableInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] + public static extern ref int?[] NullableInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] + public static extern ref int?[][] NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] + public static extern ref long? NullableInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] + public static extern ref long?[] NullableInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] + public static extern ref List<long?[][]> NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] + public static extern ref sbyte? NullableInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] + public static extern ref sbyte?[] NullableInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] + public static extern ref IEnumerable<PhysicalAddress[][]> NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] + public static extern ref string NullableString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] + public static extern ref string[] NullableStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] + public static extern ref string[][] NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] + public static extern ref TimeOnly? NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly?[] NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] + public static extern ref TimeSpan? NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] + public static extern ref TimeSpan?[] NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] + public static extern ref ushort? NullableUInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] + public static extern ref ushort?[] NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] + public static extern ref uint? NullableUInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] + public static extern ref uint?[] NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] + public static extern ref ulong? NullableUInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] + public static extern ref ulong?[] NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] + public static extern ref byte? NullableUInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] + public static extern ref byte?[] NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] + public static extern ref byte?[][] NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] + public static extern ref Uri NullableUri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] + public static extern ref Uri[] NullableUriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] + public static extern ref string String(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] + public static extern ref string[] StringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] + public static extern ref string[][] StringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] + public static extern ref string StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] + public static extern ref string StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] + public static extern ref string StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] + public static extern ref string StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] + public static extern ref string StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] + public static extern ref string StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] + public static extern ref string StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] + public static extern ref string StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] + public static extern ref TimeOnly TimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly[] TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] + public static extern ref TimeSpan TimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] + public static extern ref TimeSpan[] TimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] + public static extern ref ushort UInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] + public static extern ref ushort[] UInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] + public static extern ref uint UInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] + public static extern ref uint[] UInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] + public static extern ref ulong UInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] + public static extern ref ulong[] UInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] + public static extern ref byte UInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] + public static extern ref byte[] UInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] + public static extern ref List<byte[]> UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] + public static extern ref Uri Uri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] + public static extern ref Uri[] UriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] + public static extern ref Uri UriToStringConverterProperty(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 2da0de34cfb..add64a5a8a9 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 @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -42,11 +41,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalDerivedId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalDerivedId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -55,17 +54,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalDerivedId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalDerivedId)); principalDerivedId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -75,11 +74,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalDerivedAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalDerivedAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -88,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalDerivedAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalDerivedAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalDerivedAlternateId)); @@ -111,11 +110,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); id.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -124,17 +123,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -145,20 +144,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[3]); details.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -167,24 +166,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); details.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); details.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -193,20 +191,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<Number>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[4]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[4]); number.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -215,19 +213,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); number.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -236,20 +233,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeArray.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -258,17 +255,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -277,43 +274,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -322,20 +318,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeEnumerable.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -344,17 +340,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -366,24 +362,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -392,20 +387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeIList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -414,17 +409,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -436,24 +431,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -462,20 +456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -484,17 +478,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -503,43 +497,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -548,20 +541,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[9]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeArray.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -570,17 +563,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -592,19 +585,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -613,20 +605,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeEnumerable.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -635,17 +627,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -657,19 +649,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -678,20 +669,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeIList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -700,17 +691,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -722,19 +713,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -743,20 +733,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -765,17 +755,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -787,19 +777,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -836,19 +825,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); manyOwned.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance) == null); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) == null, + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance) == null); manyOwned.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), null); manyOwned.SetPropertyIndexes( index: 3, @@ -857,11 +846,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 5, storeGenerationIndex: -1); manyOwned.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), - () => (ICollection<CompiledModelTestBase.OwnedType>)(ICollection<CompiledModelTestBase.OwnedType>)new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), + ICollection<CompiledModelTestBase.OwnedType> () => ((ICollection<CompiledModelTestBase.OwnedType>)(((ICollection<CompiledModelTestBase.OwnedType>)(new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -884,24 +873,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, int>(source.ContainsKey("PrincipalDerivedId") ? (long)source["PrincipalDerivedId"] : 0L, source.ContainsKey("PrincipalDerivedAlternateId") ? (Guid)source["PrincipalDerivedAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, int>((source.ContainsKey("PrincipalDerivedId") ? ((long)(source["PrincipalDerivedId"])) : 0L), (source.ContainsKey("PrincipalDerivedAlternateId") ? ((Guid)(source["PrincipalDerivedAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 13, @@ -923,35 +912,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } 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 52355cff60b..d391f95c08a 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 @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -44,11 +43,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalBaseId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -57,17 +56,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalBaseId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalBaseId)); principalBaseId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -78,11 +77,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalBaseAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalBaseAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -91,17 +90,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalBaseAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalBaseAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalBaseAlternateId)); @@ -115,20 +114,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[2]); details.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -137,24 +136,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); details.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); details.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -164,20 +162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[3]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[3]); number.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -186,19 +184,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); number.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -208,20 +205,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[4]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[4]); refTypeArray.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -230,17 +227,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -249,43 +246,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -295,20 +291,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeEnumerable.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -317,17 +313,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -339,24 +335,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -366,20 +361,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeIList.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -388,17 +383,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -410,24 +405,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -437,20 +431,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -459,17 +453,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -478,43 +472,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -524,20 +517,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); valueTypeArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -546,17 +539,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -568,19 +561,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -590,20 +582,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeEnumerable.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -612,17 +604,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -634,19 +626,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -656,20 +647,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeIList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -678,17 +669,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -700,19 +691,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -722,20 +712,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -744,17 +734,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -766,19 +756,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -819,19 +808,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); owned.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); owned.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetAccessors( - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), null); owned.SetPropertyIndexes( index: 0, @@ -839,7 +828,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - owned.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return runtimeForeignKey; } @@ -861,24 +849,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid>(source.ContainsKey("PrincipalBaseId") ? (long)source["PrincipalBaseId"] : 0L, source.ContainsKey("PrincipalBaseAlternateId") ? (Guid)source["PrincipalBaseAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"))); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid>((source.ContainsKey("PrincipalBaseId") ? ((long)(source["PrincipalBaseId"])) : 0L), (source.ContainsKey("PrincipalBaseAlternateId") ? ((Guid)(source["PrincipalBaseAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 12, @@ -900,35 +888,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..ed8d21e397c --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,45 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable<string> _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList<string> _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List<IPAddress> _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable<byte> _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List<short> _valueTypeList(CompiledModelTestBase.OwnedType @this); + } +} 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 dd1666e0280..3eeecf72801 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 @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -47,20 +46,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -69,22 +68,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var alternateId = runtimeEntityType.AddProperty( "AlternateId", @@ -95,20 +93,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas sentinel: new Guid("00000000-0000-0000-0000-000000000000"), jsonValueReaderWriter: new CompiledModelTestBase.MyJsonGuidReaderWriter()); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, + bool (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetAccessors( - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); alternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -117,17 +115,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); alternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); alternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(alternateId)); @@ -140,11 +138,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 55, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); discriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -153,17 +151,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(55)", size: 55, @@ -177,20 +175,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 3), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum1.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -199,28 +197,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); enum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -229,20 +226,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 4), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[4]); enum2.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -251,29 +248,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); enum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -281,20 +277,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum1.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -303,28 +299,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); flagsEnum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -333,20 +328,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), propertyAccessMode: PropertyAccessMode.Property); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[6]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 6), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[6]); flagsEnum2.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -355,28 +350,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(6); flagsEnum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2", "TestNamespace"), ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -385,20 +379,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeArray.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -407,17 +401,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -426,43 +420,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -471,20 +464,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeEnumerable.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -493,17 +486,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -515,24 +508,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -541,20 +533,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeIList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -563,17 +555,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -585,24 +577,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -611,20 +602,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -633,17 +624,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -652,43 +643,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -697,20 +687,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeArray.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -719,17 +709,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -741,19 +731,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -762,20 +751,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeEnumerable.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -784,17 +773,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -806,19 +795,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -827,20 +815,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeIList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -849,17 +837,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -871,19 +859,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -892,20 +879,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -914,17 +901,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -936,19 +923,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -987,19 +973,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 1, @@ -1008,12 +994,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 3, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -1042,24 +1027,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key0)); var owned = runtimeEntityType.FindNavigation("Owned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string>(default(string))); + ISnapshot () => ((ISnapshot)(new Snapshot<string>(default(string))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -1081,53 +1066,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] - public static extern CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] - public static extern void UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs index df9543d726c..a8786862ae2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs @@ -41,16 +41,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); derivedsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -59,26 +59,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null) == null) { return entry.ReadTemporaryValue<long>(0); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); derivedsId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -87,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); derivedsId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); derivedsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(derivedsId)); derivedsId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -107,16 +107,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); derivedsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(1)) { @@ -125,26 +125,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(1); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); derivedsAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -153,17 +153,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); derivedsAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); derivedsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(derivedsAlternateId)); @@ -175,16 +175,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); principalsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(2)) { @@ -193,26 +193,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null) == null) + if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null) == null) { return entry.ReadTemporaryValue<long>(2); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); principalsId.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -221,17 +221,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); principalsId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalsId)); principalsId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -241,16 +241,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); principalsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(3)) { @@ -259,26 +259,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(3); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), - (ValueBuffer valueBuffer) => valueBuffer[3]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), + object (ValueBuffer valueBuffer) => valueBuffer[3]); principalsAlternateId.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -287,17 +287,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 3); principalsAlternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); principalsAlternateId.SetCurrentValueComparer(new EntryCurrentValueComparer<Guid>(principalsAlternateId)); @@ -313,20 +313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); rowid.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); + byte[] (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, + byte[] (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); rowid.SetSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetMaterializationSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), - (ValueBuffer valueBuffer) => valueBuffer[4]); + byte[] (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : (entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))))), + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), + object (ValueBuffer valueBuffer) => valueBuffer[4]); rowid.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -335,17 +335,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 4); rowid.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(v1, v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(v), - (byte[] v) => v.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(v1, v2), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(v), + byte[] (byte[] v) => v.ToArray()), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "rowversion", size: 8), @@ -395,24 +395,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(rowid))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), (source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(rowid)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(default(Guid)), default(byte[]) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(default(byte[])))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(byte[]) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(default(byte[]))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)((IProperty)derivedsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)(((IProperty)derivedsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 5, diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..4b43c6dd1f6 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,63 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] + public static extern CompiledModelTestBase.AFlagsEnum Get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] + public static extern void Set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} 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 13e46dbe5b3..11f82f08441 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 @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -57,19 +56,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 4, @@ -78,12 +77,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 6, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -108,24 +106,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var dependent = runtimeEntityType.FindNavigation("Dependent")!; var manyOwned = runtimeEntityType.FindNavigation("ManyOwned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string>(default(string))); + ISnapshot () => ((ISnapshot)(new Snapshot<string>(default(string))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object, object, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null, UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity8)), null); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object, object, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null, PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity8)), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -146,14 +144,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<byte?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] - public static extern ref ICollection<CompiledModelTestBase.OwnedType> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..924e4c82620 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,23 @@ +// <auto-generated /> +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] + public static extern ref ICollection<CompiledModelTestBase.OwnedType> ManyOwned(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Principals(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs index 867dfdd0faa..5e6c430cf8b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -72,20 +71,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -94,22 +93,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -126,24 +124,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -164,8 +162,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..9bbed4ed29f --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,48 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable<string> _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList<string> _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List<IPAddress> _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable<byte> _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List<short> _valueTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalBase Principal(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs index decb61c9ad1..498d6dc463e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -49,20 +48,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueGenerated: ValueGenerated.OnAdd, afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(0) && !(PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue<long?>(0) : PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -71,22 +70,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var discriminator = runtimeEntityType.AddProperty( "Discriminator", @@ -95,11 +93,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 55, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[1]); discriminator.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -108,17 +106,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); discriminator.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(55)", size: 55, @@ -132,20 +130,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum1.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -154,28 +152,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); enum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -184,20 +181,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum2.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -206,29 +203,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); enum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -236,20 +232,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum1.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -258,28 +254,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); flagsEnum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -287,20 +282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum2.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -309,39 +304,38 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(0); flagsEnum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2", "TestNamespace") }); var principalBaseId = runtimeEntityType.AddProperty( "PrincipalBaseId", typeof(long?), nullable: true); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<Nullable<long>>(1) : entry.FlaggedAsTemporary(6) && !entry.ReadShadowValue<Nullable<long>>(1).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(1) : entry.ReadShadowValue<Nullable<long>>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Nullable<long>>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(principalBaseId, 6), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(principalBaseId, 1), - (ValueBuffer valueBuffer) => valueBuffer[6]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<long?>(1) : (entry.FlaggedAsTemporary(6) && !(entry.ReadShadowValue<long?>(1).HasValue) ? entry.ReadTemporaryValue<long?>(1) : entry.ReadShadowValue<long?>(1))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue<long?>(1), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(principalBaseId, 6), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(principalBaseId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[6]); principalBaseId.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -350,17 +344,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalBaseId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalBaseId.SetValueComparer(new NullableValueComparer<long>(principalBaseId.TypeMapping.Comparer)); principalBaseId.SetKeyValueComparer(new NullableValueComparer<long>(principalBaseId.TypeMapping.KeyComparer)); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(principalBaseId)); @@ -373,20 +367,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeArray.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -395,17 +389,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -414,43 +408,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -459,20 +452,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeEnumerable.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -481,17 +474,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -503,24 +496,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -529,20 +521,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeIList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -551,17 +543,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -573,24 +565,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -599,20 +590,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -621,17 +612,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -640,43 +631,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -685,20 +675,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeArray.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -707,17 +697,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -729,19 +719,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -750,20 +739,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeEnumerable.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -772,17 +761,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -794,19 +783,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -815,20 +803,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeIList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -837,17 +825,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -859,19 +847,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -880,20 +867,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -902,17 +889,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -924,19 +911,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); OwnedComplexProperty.Create(runtimeEntityType); var key = runtimeEntityType.AddKey( @@ -966,19 +952,19 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) var complexType = complexProperty.ComplexType; complexProperty.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); complexProperty.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); complexProperty.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); complexProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(complexProperty), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(complexProperty), null); complexProperty.SetPropertyIndexes( index: 0, @@ -1003,28 +989,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) scale: 2, sentinel: ""); details.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details, - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details) == null) && (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity).Details) == "", - (CompiledModelTestBase.OwnedType instance) => instance.Details, - (CompiledModelTestBase.OwnedType instance) => !(instance.Details == null) && instance.Details == ""); + string (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details), + bool (CompiledModelTestBase.PrincipalBase entity) => !((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == null) && (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(entity).Details) == "", + string (CompiledModelTestBase.OwnedType instance) => instance.Details, + bool (CompiledModelTestBase.OwnedType instance) => !(instance.Details == null) && instance.Details == ""); details.SetSetter( (CompiledModelTestBase.PrincipalBase entity, string value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); level1.Details = value; }); details.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, string value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); level1.Details = value; }); details.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(15) ? entry.ReadStoreGeneratedValue<string>(2) : entry.FlaggedAsTemporary(15) && !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details) == null) && (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details) == "" ? entry.ReadTemporaryValue<string>(2) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details, - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(string) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity).Details, - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[15]); + string (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(15) ? entry.ReadStoreGeneratedValue<string>(2) : (entry.FlaggedAsTemporary(15) && !((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details) == null) && (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details) == "" ? entry.ReadTemporaryValue<string>(2) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details))), + string (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(string) : PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).Details), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 15), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[15]); details.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -1033,17 +1019,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: 2); details.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varchar(64)", size: 64, @@ -1053,7 +1039,6 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) details.AddAnnotation("Relational:ColumnName", "Deets"); details.AddAnnotation("Relational:ColumnType", "varchar"); details.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ((string)null, (string)null), ((string)null, (string)null), ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = complexType.AddProperty( "Number", @@ -1062,28 +1047,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<Number>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(entity))) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( (CompiledModelTestBase.PrincipalBase entity, int value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; }); number.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, int value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Number(level1) = value; }); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(int) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[16]); + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(int) : OwnedTypeUnsafeAccessors.Number(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 16), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[16]); number.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -1092,19 +1077,18 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); number.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = complexType.AddProperty( "RefTypeArray", @@ -1113,28 +1097,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; }); refTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeArray(level1) = value; }); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IPAddress[]) : OwnedTypeUnsafeAccessors._refTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 17), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); refTypeArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1143,17 +1127,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1162,43 +1146,42 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); var refTypeEnumerable = complexType.AddProperty( "RefTypeEnumerable", @@ -1207,28 +1190,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable<string>) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable<string>) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; }); refTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeEnumerable(level1) = value; }); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[18]); + IEnumerable<string> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable<string>) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable<string> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable<string>) : OwnedTypeUnsafeAccessors._refTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 18), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[18]); refTypeEnumerable.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1237,17 +1220,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1259,24 +1242,23 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = complexType.AddProperty( "RefTypeIList", @@ -1285,28 +1267,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList<string>) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList<string>) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; }); refTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeIList(level1) = value; }); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[19]); + IList<string> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList<string>) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList<string> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList<string>) : OwnedTypeUnsafeAccessors._refTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 19), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[19]); refTypeIList.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1315,17 +1297,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1337,24 +1319,23 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = complexType.AddProperty( "RefTypeList", @@ -1363,28 +1344,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List<IPAddress>) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List<IPAddress>) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; }); refTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._refTypeList(level1) = value; }); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[20]); + List<IPAddress> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List<IPAddress>) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List<IPAddress> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List<IPAddress>) : OwnedTypeUnsafeAccessors._refTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 20), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[20]); refTypeList.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1393,17 +1374,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1412,43 +1393,42 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); var valueTypeArray = complexType.AddProperty( "ValueTypeArray", @@ -1457,28 +1437,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; }); valueTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeArray(level1) = value; }); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(DateTime[]) : OwnedTypeUnsafeAccessors._valueTypeArray(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 21), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[21]); valueTypeArray.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1487,17 +1467,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1509,19 +1489,18 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = complexType.AddProperty( "ValueTypeEnumerable", @@ -1530,28 +1509,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable<byte>) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IEnumerable<byte>) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; }); valueTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeEnumerable(level1) = value; }); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[22]); + IEnumerable<byte> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable<byte>) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable<byte> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IEnumerable<byte>) : OwnedTypeUnsafeAccessors._valueTypeEnumerable(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 22), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[22]); valueTypeEnumerable.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1560,17 +1539,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1582,19 +1561,18 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = complexType.AddProperty( "ValueTypeIList", @@ -1603,28 +1581,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList<byte>) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(IList<byte>) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; }); valueTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.ValueTypeIList(level1) = value; }); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[23]); + IList<byte> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList<byte>) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList<byte> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(IList<byte>) : OwnedTypeUnsafeAccessors.ValueTypeIList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 23), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[23]); valueTypeIList.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1633,17 +1611,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1655,19 +1633,18 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = complexType.AddProperty( "ValueTypeList", @@ -1676,28 +1653,28 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List<short>) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(List<short>) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List<short> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; }); valueTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List<short> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors._valueTypeList(level1) = value; }); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[24]); + List<short> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List<short>) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List<short> (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(List<short>) : OwnedTypeUnsafeAccessors._valueTypeList(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 24), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[24]); valueTypeList.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1706,17 +1683,17 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -1728,19 +1705,18 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); PrincipalComplexProperty.Create(complexType); complexType.AddAnnotation("go", "brr"); @@ -1751,7 +1727,6 @@ public static RuntimeComplexProperty Create(RuntimeEntityType declaringType) complexType.AddAnnotation("Relational:ViewName", "PrincipalBaseView"); complexType.AddAnnotation("Relational:ViewSchema", null); complexProperty.AddAnnotation("goo", "ber"); - complexProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return complexProperty; } @@ -1769,27 +1744,27 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) var complexType = complexProperty.ComplexType; complexProperty.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)), - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(instance) == null); + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))), + bool (CompiledModelTestBase.PrincipalBase entity) => (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null, + CompiledModelTestBase.PrincipalBase (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Principal(instance) == null); complexProperty.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; }); complexProperty.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.PrincipalBase value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + OwnedTypeUnsafeAccessors.Principal(level1) = value; }); complexProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity)), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalBase>(complexProperty), + CompiledModelTestBase.PrincipalBase (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalBase>(complexProperty), null); complexProperty.SetPropertyIndexes( index: 1, @@ -1803,30 +1778,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("AlternateId", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))).AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))).AlternateId) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))).AlternateId) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); level2.AlternateId = value; }); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); level2.AlternateId = value; }); alternateId.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))).AlternateId, - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Guid) : (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(alternateId), - (ValueBuffer valueBuffer) => valueBuffer[25]); + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(Guid) : (PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))).AlternateId), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 25), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(alternateId), + object (ValueBuffer valueBuffer) => valueBuffer[25]); alternateId.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1835,17 +1810,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); alternateId.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); alternateId.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); @@ -1856,30 +1831,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; }); enum1.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum1(level2) = value; }); enum1.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AnEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[26]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum) : PrincipalBaseUnsafeAccessors.Enum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 26), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[26]); enum1.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1888,28 +1863,27 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); enum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = complexType.AddProperty( "Enum2", @@ -1918,30 +1892,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable<CompiledModelTestBase.AnEnum>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable<CompiledModelTestBase.AnEnum>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(level2) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); }); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(level2) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Enum2(level2) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value))))); }); enum2.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable<CompiledModelTestBase.AnEnum>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable<CompiledModelTestBase.AnEnum>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[27]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AnEnum? ) : PrincipalBaseUnsafeAccessors.Enum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 27), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[27]); enum2.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1950,29 +1924,28 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); enum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = complexType.AddProperty( "FlagsEnum1", @@ -1980,30 +1953,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; }); flagsEnum1.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum1(level2) = value; }); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[28]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum1((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 28), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[28]); flagsEnum1.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -2012,28 +1985,27 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); flagsEnum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = complexType.AddProperty( "FlagsEnum2", @@ -2041,30 +2013,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum2.SetSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; }); flagsEnum2.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.FlagsEnum2(level2) = value; }); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(CompiledModelTestBase.AFlagsEnum) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[29]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(CompiledModelTestBase.AFlagsEnum) : PrincipalBaseUnsafeAccessors.FlagsEnum2((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 29), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[29]); flagsEnum2.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -2073,28 +2045,27 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(0); flagsEnum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2", "TestNamespace") }); var id = complexType.AddProperty( "Id", @@ -2103,30 +2074,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable<long>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => !((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(Nullable<long>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => !(((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => + (CompiledModelTestBase.PrincipalBase entity, long? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; }); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => + (CompiledModelTestBase.PrincipalBase entity, long? value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.Id(level2) = value; }); id.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable<long>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(Nullable<long>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>>(id), - (ValueBuffer valueBuffer) => valueBuffer[30]); + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(long? ) : PrincipalBaseUnsafeAccessors.Id((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 30), + long? (InternalEntityEntry entry) => entry.GetCurrentValue<long?>(id), + object (ValueBuffer valueBuffer) => valueBuffer[30]); id.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -2135,21 +2106,20 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); id.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var refTypeArray = complexType.AddProperty( "RefTypeArray", @@ -2158,30 +2128,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; }); refTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeArray(level2) = value; }); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IPAddress[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[31]); + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IPAddress[]) : PrincipalBaseUnsafeAccessors.RefTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 31), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[31]); refTypeArray.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -2190,17 +2160,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2209,43 +2179,42 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); var refTypeEnumerable = complexType.AddProperty( "RefTypeEnumerable", @@ -2254,30 +2223,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable<string>) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable<string>) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; }); refTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeEnumerable(level2) = value; }); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[32]); + IEnumerable<string> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable<string>) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable<string> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable<string>) : PrincipalBaseUnsafeAccessors.RefTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 32), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[32]); refTypeEnumerable.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -2286,17 +2255,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2308,24 +2277,23 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = complexType.AddProperty( "RefTypeIList", @@ -2334,30 +2302,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList<string>) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList<string>) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; }); refTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeIList(level2) = value; }); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList<string>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[33]); + IList<string> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList<string>) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList<string> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList<string>) : PrincipalBaseUnsafeAccessors.RefTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 33), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[33]); refTypeIList.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -2366,17 +2334,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2388,24 +2356,23 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = complexType.AddProperty( "RefTypeList", @@ -2414,30 +2381,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List<IPAddress>) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List<IPAddress>) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; }); refTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.RefTypeList(level2) = value; }); refTypeList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List<IPAddress>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[34]); + List<IPAddress> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List<IPAddress>) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List<IPAddress> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List<IPAddress>) : PrincipalBaseUnsafeAccessors.RefTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 34), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[34]); refTypeList.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -2446,17 +2413,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2465,43 +2432,42 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); var valueTypeArray = complexType.AddProperty( "ValueTypeArray", @@ -2510,30 +2476,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; }); valueTypeArray.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeArray(level2) = value; }); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(DateTime[]) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[35]); + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(DateTime[]) : PrincipalBaseUnsafeAccessors.ValueTypeArray((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 35), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[35]); valueTypeArray.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -2542,17 +2508,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2564,19 +2530,18 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = complexType.AddProperty( "ValueTypeEnumerable", @@ -2585,30 +2550,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IEnumerable<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; }); valueTypeEnumerable.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(level2) = value; }); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IEnumerable<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[36]); + IEnumerable<byte> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable<byte> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IEnumerable<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeEnumerable((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 36), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[36]); valueTypeEnumerable.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -2617,17 +2582,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2639,19 +2604,18 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = complexType.AddProperty( "ValueTypeIList", @@ -2660,30 +2624,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(IList<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; }); valueTypeIList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeIList(level2) = value; }); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(IList<byte>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[37]); + IList<byte> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList<byte> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(IList<byte>) : PrincipalBaseUnsafeAccessors.ValueTypeIList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 37), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[37]); valueTypeIList.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -2692,17 +2656,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2714,19 +2678,18 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = complexType.AddProperty( "ValueTypeList", @@ -2735,30 +2698,30 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))), - (CompiledModelTestBase.PrincipalBase entity) => ((UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity))) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity)))) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List<short>) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))), + bool (CompiledModelTestBase.PrincipalBase entity) => ((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))) == null ? default(List<short>) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(entity) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(entity))))) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( (CompiledModelTestBase.PrincipalBase entity, List<short> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; }); valueTypeList.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, List<short> value) => { - var level1 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity); - var level2 = UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(level1); - UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(level2) = value; + var level1 = PrincipalBaseUnsafeAccessors._ownedField(entity); + var level2 = OwnedTypeUnsafeAccessors.Principal(level1); + PrincipalBaseUnsafeAccessors.ValueTypeList(level2) = value; }); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => (UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))) == null ? default(List<short>) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity) == null ? default(CompiledModelTestBase.PrincipalBase) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity))), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[38]); + List<short> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List<short>) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List<short> (InternalEntityEntry entry) => ((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))) == null ? default(List<short>) : PrincipalBaseUnsafeAccessors.ValueTypeList((PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))) == null ? default(CompiledModelTestBase.PrincipalBase) : OwnedTypeUnsafeAccessors.Principal(PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 38), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[38]); valueTypeList.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2767,17 +2730,17 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -2789,19 +2752,18 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.Principal.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); complexType.AddAnnotation("Relational:FunctionName", "PrincipalBaseTvf"); complexType.AddAnnotation("Relational:Schema", null); @@ -2809,85 +2771,9 @@ public static RuntimeComplexProperty Create(RuntimeComplexType declaringType) complexType.AddAnnotation("Relational:TableName", "PrincipalBase"); complexType.AddAnnotation("Relational:ViewName", "PrincipalBaseView"); complexType.AddAnnotation("Relational:ViewSchema", null); - complexProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.Owned.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal", "TestNamespace") }); return complexProperty; } - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalBase UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Principal(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); } - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEntityType, RuntimeEntityType principalEntityType) @@ -2904,19 +2790,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Deriveds>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); deriveds.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); deriveds.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), null); deriveds.SetPropertyIndexes( index: 0, @@ -2925,12 +2811,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 2, storeGenerationIndex: -1); deriveds.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - deriveds.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -2984,26 +2869,26 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<long?>(key)); var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - var liftedArg = (ISnapshot)new Snapshot<Nullable<long>, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray0) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray0)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0)), (object)source.GetCurrentValue<IList<string>>(refTypeIList0) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList0)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList0) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList0)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray0) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray0).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray0)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable0).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList0) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList0).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList0)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList0) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList0).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList0)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum10).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum10)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum20) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum20).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum20)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum10).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum10)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum20).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum20))); - var entity0 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, (ISnapshot)new Snapshot<Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id0) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id0).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id0)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray1) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray1)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1)), (object)source.GetCurrentValue<IList<string>>(refTypeIList1) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList1)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList1) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList1)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray1) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray1).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray1)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable1).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList1) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList1).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList1)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList1) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList1).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList1))) }); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot<long?, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))))))), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray0))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList0))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList0))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList0))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList0))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray0))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList0))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList0))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList0))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList0))))))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum10)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum20) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum20))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum10)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum20))))); + var entity0 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, ((ISnapshot)(new Snapshot<long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id0) == null ? null : ((ValueComparer<long?>)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id0))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray1))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList1))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList1))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList1))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList1))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray1))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList1))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList1))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList1))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList1)))))))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, string>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable<long>)), default(string) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(default(string)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long?, string>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))), (default(string) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(default(string))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, string>(default(Nullable<long>), default(Nullable<long>), default(string))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, long?, string>(default(long? ), default(long? ), default(string))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, Nullable<long>>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalBaseId") ? (Nullable<long>)source["PrincipalBaseId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, long?>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, Nullable<long>>(default(string), default(Nullable<long>))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, long?>(default(string), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity1 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity1))); + var entity1 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long?, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity1))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 39, @@ -3112,47 +2997,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..e85cd7e3f4b --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,60 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs index edbf96651c0..a2fada2d58f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/PrincipalDerivedEntityType.cs @@ -78,26 +78,26 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var valueTypeList1 = principalBase.FindProperty("ValueTypeList")!; var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity1 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot<Nullable<long>, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray0) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray0)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0)), (object)source.GetCurrentValue<IList<string>>(refTypeIList0) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList0)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList0) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList0).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList0)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray0) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray0).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray0)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable0).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList0) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList0).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList0)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList0) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList0).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList0)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum10).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum10)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum20) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum20).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum20)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum10).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum10)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum20).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum20))); - var entity2 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg0, (ISnapshot)new Snapshot<Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id0) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id0).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id0)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray1) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray1)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1)), (object)source.GetCurrentValue<IList<string>>(refTypeIList1) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList1)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList1) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList1).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList1)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray1) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray1).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray1)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable1).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList1) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList1).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList1)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList1) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList1).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList1))) }); + var entity1 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot<long?, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))))))), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray0))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray0))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable0))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList0))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList0))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList0))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList0).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList0))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray0))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray0).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray0))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable0).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable0))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList0))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList0).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList0))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList0))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList0).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList0))))))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum10).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum10)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum20) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum20).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum20))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum10).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum10)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum20).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum20))))); + var entity2 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg0, ((ISnapshot)(new Snapshot<long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id0) == null ? null : ((ValueComparer<long?>)(((IProperty)id0).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id0))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray1))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray1))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable1))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList1))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList1))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList1))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList1).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList1))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray1))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray1).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray1))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable1).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable1))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList1))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList1).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList1))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList1))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList1).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList1)))))))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, string>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable<long>)), default(string) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(default(string)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long?, string>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))), (default(string) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(default(string))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, string>(default(Nullable<long>), default(Nullable<long>), default(string))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, long?, string>(default(long? ), default(long? ), default(string))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, Nullable<long>>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("PrincipalBaseId") ? (Nullable<long>)source["PrincipalBaseId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, long?>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, Nullable<long>>(default(string), default(Nullable<long>))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, long?>(default(string), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity3 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity3))); + var entity3 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long?, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity3))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 39, diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs index 5ef8c5d3b4f..228faba8b99 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs @@ -49,34 +49,34 @@ partial void Initialize() "varchar"); param.TypeMapping = StringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varchar", dbType: System.Data.DbType.AnsiString)); getSqlFragmentStatic.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs index aa729499bb2..e948fc7a46b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs @@ -49,17 +49,17 @@ partial void Initialize() "nvarchar(max)"); param.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -68,17 +68,17 @@ partial void Initialize() getSqlFragmentStatic.TypeMapping = StringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varchar", dbType: System.Data.DbType.AnsiString)); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs index 4a979a96d2b..49f8ef0b958 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -37,20 +36,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 0), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[0]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 0), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[0]); blob.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -59,22 +58,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); return runtimeEntityType; } @@ -83,21 +81,21 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) { var blob = runtimeEntityType.FindProperty("Blob")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<byte[]>(source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<byte[]>((source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, navigationCount: 0, @@ -117,8 +115,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs index f5f23dfcd2e..3be34a98123 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs @@ -69,17 +69,17 @@ partial void Initialize() "uniqueidentifier"); id.TypeMapping = GuidTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "uniqueidentifier")); id.AddAnnotation("MyAnnotation", new[] { 1L }); @@ -91,17 +91,17 @@ partial void Initialize() "nchar(256)"); condition.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nchar(256)", size: 256, @@ -111,17 +111,17 @@ partial void Initialize() getCount.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); functions["Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelRelationalTestBase+DbFunctionContext.GetCount(System.Guid?,string)"] = getCount; var getData = new RuntimeDbFunction( @@ -159,17 +159,17 @@ partial void Initialize() "int"); id0.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); functions["Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelRelationalTestBase+DbFunctionContext.GetData(int)"] = getData0; @@ -196,17 +196,17 @@ partial void Initialize() "nchar(256)"); date.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nchar(256)", size: 256, @@ -216,17 +216,17 @@ partial void Initialize() isDateStatic.TypeMapping = SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)); + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)); isDateStatic.AddAnnotation("MyGuid", new Guid("00000000-0000-0000-0000-000000000000")); functions["Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelRelationalTestBase+DbFunctionContext.IsDateStatic(string)"] = isDateStatic; diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs index c05ab594ac1..a09facf3cad 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs @@ -29,17 +29,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) { runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 0, navigationCount: 0, diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs index 867dfdd0faa..5e6c430cf8b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -72,20 +71,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -94,22 +93,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -126,24 +124,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -164,8 +162,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataEntityType.cs index ac6a93a00e7..4134a16f1e8 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:HiLoSequenceName", "HL"); id.AddAnnotation("SqlServer:HiLoSequenceSchema", "S"); @@ -74,20 +73,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -96,22 +95,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -128,24 +126,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -166,8 +164,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_HiLo_sequence/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataEntityType.cs index 0e79bab11f6..ff7c32df70a 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("Relational:DefaultValueSql", "NEXT VALUE FOR [KeySeqSchema].[KeySeq]"); id.AddAnnotation("SqlServer:SequenceName", "KeySeq"); @@ -75,20 +74,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -97,22 +96,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -129,24 +127,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -167,8 +165,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Key_sequence/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..ae6e1779611 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,15 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs index 21108823b18..fee5ee69e12 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -37,20 +36,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) == 0, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance) == 0); + int (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity) == 0, + int (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance) == 0); id.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -59,20 +58,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var data = runtimeEntityType.AddProperty( "Data", @@ -81,20 +79,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentDerived<int>).GetField("<Data>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); data.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[1]); data.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -103,24 +101,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None); data.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -137,24 +134,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int, string>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, string>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -175,11 +172,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<int> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<int> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/AbstractBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/AbstractBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..87b880debfb --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/AbstractBaseUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class AbstractBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref int Id(CompiledModelTestBase.AbstractBase @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/SpatialTypesEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/SpatialTypesEntityType.cs index 262890e035d..56eb331cd5d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/SpatialTypesEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/SpatialTypesTest/SpatialTypesEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelRelationalTestBase.SpatialTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(entity), - (CompiledModelRelationalTestBase.SpatialTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(entity) == 0, - (CompiledModelRelationalTestBase.SpatialTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(instance), - (CompiledModelRelationalTestBase.SpatialTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(instance) == 0); + int (CompiledModelRelationalTestBase.SpatialTypes entity) => AbstractBaseUnsafeAccessors.Id(entity), + bool (CompiledModelRelationalTestBase.SpatialTypes entity) => AbstractBaseUnsafeAccessors.Id(entity) == 0, + int (CompiledModelRelationalTestBase.SpatialTypes instance) => AbstractBaseUnsafeAccessors.Id(instance), + bool (CompiledModelRelationalTestBase.SpatialTypes instance) => AbstractBaseUnsafeAccessors.Id(instance) == 0); id.SetSetter( - (CompiledModelRelationalTestBase.SpatialTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(entity) = value); + (CompiledModelRelationalTestBase.SpatialTypes entity, int value) => AbstractBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelRelationalTestBase.SpatialTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(entity) = value); + (CompiledModelRelationalTestBase.SpatialTypes entity, int value) => AbstractBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id((CompiledModelRelationalTestBase.SpatialTypes)entry.Entity) == 0 ? entry.ReadTemporaryValue<int>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id((CompiledModelRelationalTestBase.SpatialTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id((CompiledModelRelationalTestBase.SpatialTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && AbstractBaseUnsafeAccessors.Id(((CompiledModelRelationalTestBase.SpatialTypes)(entry.Entity))) == 0 ? entry.ReadTemporaryValue<int>(0) : AbstractBaseUnsafeAccessors.Id(((CompiledModelRelationalTestBase.SpatialTypes)(entry.Entity))))), + int (InternalEntityEntry entry) => AbstractBaseUnsafeAccessors.Id(((CompiledModelRelationalTestBase.SpatialTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -61,20 +60,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("SpatialTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id", "TestNamespace") }); var point = runtimeEntityType.AddProperty( "Point", @@ -85,11 +83,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueComparer: new CompiledModelTestBase.CustomValueComparer<Point>(), providerValueComparer: new CompiledModelTestBase.CustomValueComparer<Point>()); point.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Point>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Point>(0) == null ? entry.ReadTemporaryValue<Point>(1) : entry.ReadShadowValue<Point>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Point (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Point>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Point>(0) == null ? entry.ReadTemporaryValue<Point>(1) : entry.ReadShadowValue<Point>(0))), + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(0), + Point (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 1), + Point (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), + object (ValueBuffer valueBuffer) => valueBuffer[1]); point.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -116,24 +114,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelRelationalTestBase.SpatialTypes)source.Entity; - return (ISnapshot)new Snapshot<int, Point>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point))); + var entity = ((CompiledModelRelationalTestBase.SpatialTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, Point>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int, Point>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)), default(Point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(default(Point)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, Point>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)), (default(Point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(default(Point))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int, Point>(default(int), default(Point))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int, Point>(default(int), default(Point))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Point>(source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<Point>((source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Point>(default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<Point>(default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelRelationalTestBase.SpatialTypes)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelRelationalTestBase.SpatialTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -154,8 +152,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_AbstractBase_Id(CompiledModelTestBase.AbstractBase @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseEntityType.cs index ee2625a94bb..323cb549360 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -40,20 +39,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + byte? (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => !(DependentBaseUnsafeAccessors<byte?>.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => !(DependentBaseUnsafeAccessors<byte?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<byte>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(id, 0), + byte? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<byte?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -62,33 +61,32 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)); id.SetValueComparer(new NullableValueComparer<byte>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<byte>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<byte?>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var principalId = runtimeEntityType.AddProperty( "PrincipalId", typeof(long?), nullable: true); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(1) && !entry.ReadShadowValue<Nullable<long>>(0).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : entry.ReadShadowValue<Nullable<long>>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<Nullable<long>>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(principalId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(principalId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(1) && !(entry.ReadShadowValue<long?>(0).HasValue) ? entry.ReadTemporaryValue<long?>(0) : entry.ReadShadowValue<long?>(0))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue<long?>(0), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(principalId, 1), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(principalId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -97,17 +95,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalId.SetValueComparer(new NullableValueComparer<long>(principalId.TypeMapping.Comparer)); principalId.SetKeyValueComparer(new NullableValueComparer<long>(principalId.TypeMapping.KeyComparer)); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(principalId)); @@ -142,19 +140,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -162,7 +160,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -171,19 +168,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>).GetField("<Dependent>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<byte>>>(dependent), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<byte?>>(dependent), null); dependent.SetPropertyIndexes( index: 1, @@ -203,24 +200,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<byte?>(key)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<byte>, Nullable<long>>(source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<Nullable<long>>(principalId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalId))); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<byte?, long?>((source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<long?>(principalId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalId)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalId).GetValueComparer()).Snapshot(default(Nullable<long>)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>>(default(Nullable<long>))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?>(default(long? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Nullable<long>>(source.ContainsKey("PrincipalId") ? (Nullable<long>)source["PrincipalId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long?>((source.ContainsKey("PrincipalId") ? ((long? )(source["PrincipalId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>>(default(Nullable<long>))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?>(default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<byte>, Nullable<long>, object>(source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<Nullable<long>>(principalId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<byte?, long?, object>((source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<long?>(principalId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalId))), DependentBaseUnsafeAccessors<byte?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -241,11 +238,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<byte?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<byte?> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} 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 234680bb094..9ee49be5a27 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -45,20 +44,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -67,17 +66,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); @@ -93,7 +92,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas id.AddAnnotation("Relational:RelationalOverrides", overrides); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var enum1 = runtimeEntityType.AddProperty( "Enum1", @@ -102,20 +100,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueGenerated: ValueGenerated.OnAdd); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)CompiledModelTestBase.AnEnum.A), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)CompiledModelTestBase.AnEnum.A)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)(CompiledModelTestBase.AnEnum.A))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)(CompiledModelTestBase.AnEnum.A)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.AnEnum>(0) : entry.FlaggedAsTemporary(1) && object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), (object)CompiledModelTestBase.AnEnum.A) ? entry.ReadTemporaryValue<CompiledModelTestBase.AnEnum>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.AnEnum>(0) : (entry.FlaggedAsTemporary(1) && object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), ((object)(CompiledModelTestBase.AnEnum.A))) ? entry.ReadTemporaryValue<CompiledModelTestBase.AnEnum>(0) : PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 1), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); enum1.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -124,25 +122,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(1); var overrides0 = new StoreObjectDictionary<RuntimeRelationalPropertyOverrides>(); @@ -156,7 +154,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum1.AddAnnotation("Relational:DefaultValue", CompiledModelTestBase.AnEnum.A); enum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -165,20 +162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 2), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum2.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -187,29 +184,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); enum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -217,20 +213,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 3), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[3]); flagsEnum1.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -239,28 +235,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); flagsEnum1.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -268,20 +263,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum2", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum2(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum2(entity) = value); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum2.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -290,39 +285,38 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(0); flagsEnum2.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2", "TestNamespace") }); var principalBaseId = runtimeEntityType.AddProperty( "PrincipalBaseId", typeof(long?), nullable: true); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue<Nullable<long>>(1) : entry.FlaggedAsTemporary(5) && !entry.ReadShadowValue<Nullable<long>>(0).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(1) : entry.ReadShadowValue<Nullable<long>>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<Nullable<long>>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(principalBaseId, 5), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(principalBaseId, 1), - (ValueBuffer valueBuffer) => valueBuffer[5]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(5) ? entry.ReadStoreGeneratedValue<long?>(1) : (entry.FlaggedAsTemporary(5) && !(entry.ReadShadowValue<long?>(0).HasValue) ? entry.ReadTemporaryValue<long?>(1) : entry.ReadShadowValue<long?>(0))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue<long?>(0), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(principalBaseId, 5), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(principalBaseId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[5]); principalBaseId.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -331,17 +325,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 1); principalBaseId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalBaseId.SetValueComparer(new NullableValueComparer<long>(principalBaseId.TypeMapping.Comparer)); principalBaseId.SetKeyValueComparer(new NullableValueComparer<long>(principalBaseId.TypeMapping.KeyComparer)); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(principalBaseId)); @@ -352,11 +346,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas typeof(long?), nullable: true); principalDerivedId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<Nullable<long>>(2) : entry.FlaggedAsTemporary(6) && !entry.ReadShadowValue<Nullable<long>>(1).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(2) : entry.ReadShadowValue<Nullable<long>>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Nullable<long>>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(principalDerivedId, 6), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(principalDerivedId, 2), - (ValueBuffer valueBuffer) => valueBuffer[6]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<long?>(2) : (entry.FlaggedAsTemporary(6) && !(entry.ReadShadowValue<long?>(1).HasValue) ? entry.ReadTemporaryValue<long?>(2) : entry.ReadShadowValue<long?>(1))), + long? (InternalEntityEntry entry) => entry.ReadShadowValue<long?>(1), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(principalDerivedId, 6), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(principalDerivedId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[6]); principalDerivedId.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -365,17 +359,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); principalDerivedId.TypeMapping = SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)); + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)); principalDerivedId.SetValueComparer(new NullableValueComparer<long>(principalDerivedId.TypeMapping.Comparer)); principalDerivedId.SetKeyValueComparer(new NullableValueComparer<long>(principalDerivedId.TypeMapping.KeyComparer)); principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(principalDerivedId)); @@ -388,20 +382,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeArray.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -410,17 +404,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -429,43 +423,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -474,20 +467,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeEnumerable.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -496,17 +489,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -518,24 +511,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -544,20 +536,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeIList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -566,17 +558,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -588,24 +580,23 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), storeTypePostfix: StoreTypePostfix.None)); refTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -614,20 +605,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -636,17 +627,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -655,43 +646,42 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(45)", size: 45, unicode: true, dbType: System.Data.DbType.String), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); refTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -700,20 +690,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeArray.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -722,17 +712,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -744,19 +734,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))); + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))); valueTypeArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -765,20 +754,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeEnumerable.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -787,17 +776,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -809,19 +798,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeEnumerable.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -830,20 +818,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeIList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -852,17 +840,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -874,19 +862,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))); + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))); valueTypeIList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -895,20 +882,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -917,17 +904,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "nvarchar(max)", unicode: true, @@ -939,19 +926,18 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))); + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))); valueTypeList.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -984,19 +970,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Deriveds>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); deriveds.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); deriveds.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); deriveds.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(deriveds), null); deriveds.SetPropertyIndexes( index: 0, @@ -1005,12 +991,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 3, storeGenerationIndex: -1); deriveds.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - deriveds.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -1028,19 +1013,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>).GetField("<Principals>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principals.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance) == null); principals.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); principals.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); principals.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(principals), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(principals), null); principals.SetPropertyIndexes( index: 2, @@ -1049,11 +1034,11 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt relationshipIndex: 5, storeGenerationIndex: -1); principals.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -1079,24 +1064,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<long?>(key)); var deriveds = runtimeEntityType.FindNavigation("Deriveds")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable<long>, Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), source.GetCurrentValue<Nullable<long>>(principalDerivedId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalDerivedId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, long?, long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (source.GetCurrentValue<long?>(principalDerivedId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalDerivedId))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.AnEnum, Nullable<long>, Nullable<long>>(((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(default(CompiledModelTestBase.AnEnum)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable<long>)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(Nullable<long>)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.AnEnum, long?, long?>(((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(default(CompiledModelTestBase.AnEnum)), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.AnEnum, Nullable<long>, Nullable<long>>(default(CompiledModelTestBase.AnEnum), default(Nullable<long>), default(Nullable<long>))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.AnEnum, long?, long?>(default(CompiledModelTestBase.AnEnum), default(long? ), default(long? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>>(source.ContainsKey("PrincipalBaseId") ? (Nullable<long>)source["PrincipalBaseId"] : null, source.ContainsKey("PrincipalDerivedId") ? (Nullable<long>)source["PrincipalDerivedId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long?, long?>((source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null), (source.ContainsKey("PrincipalDerivedId") ? ((long? )(source["PrincipalDerivedId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>>(default(Nullable<long>), default(Nullable<long>))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long?>(default(long? ), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, Nullable<long>, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), source.GetCurrentValue<Nullable<long>>(principalDerivedId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalDerivedId)), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity))); + var entity = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long?, long?, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (source.GetCurrentValue<long?>(principalDerivedId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalDerivedId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -1207,47 +1192,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..5495088cedf --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,57 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} 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 afb6ce12aef..fd2f469da95 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -53,24 +52,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var dependent = runtimeEntityType.FindNavigation("Dependent")!; var principals = runtimeEntityType.FindNavigation("Principals")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable<long>, Nullable<long>, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), source.GetCurrentValue<Nullable<long>>(principalDerivedId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalDerivedId)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, long?, long?, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (source.GetCurrentValue<long?>(principalDerivedId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalDerivedId))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.AnEnum, Nullable<long>, Nullable<long>>(((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(default(CompiledModelTestBase.AnEnum)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(Nullable<long>)), default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(Nullable<long>)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.AnEnum, long?, long?>(((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(default(CompiledModelTestBase.AnEnum)), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long? ))), (default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long? ))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.AnEnum, Nullable<long>, Nullable<long>>(default(CompiledModelTestBase.AnEnum), default(Nullable<long>), default(Nullable<long>))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.AnEnum, long?, long?>(default(CompiledModelTestBase.AnEnum), default(long? ), default(long? ))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>>(source.ContainsKey("PrincipalBaseId") ? (Nullable<long>)source["PrincipalBaseId"] : null, source.ContainsKey("PrincipalDerivedId") ? (Nullable<long>)source["PrincipalDerivedId"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long?, long?>((source.ContainsKey("PrincipalBaseId") ? ((long? )(source["PrincipalBaseId"])) : null), (source.ContainsKey("PrincipalDerivedId") ? ((long? )(source["PrincipalDerivedId"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>>(default(Nullable<long>), default(Nullable<long>))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, long?>(default(long? ), default(long? ))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Nullable<long>, Nullable<long>, object, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), source.GetCurrentValue<Nullable<long>>(principalBaseId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalBaseId)), source.GetCurrentValue<Nullable<long>>(principalDerivedId) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(principalDerivedId)), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity))); + var entity = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, long?, long?, object, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), (source.GetCurrentValue<long?>(principalBaseId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalBaseId))), (source.GetCurrentValue<long?>(principalDerivedId) == null ? null : ((ValueComparer<long?>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(principalDerivedId))), SnapshotFactoryFactory.SnapshotCollection(PrincipalBaseUnsafeAccessors.Deriveds(entity)), PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -179,11 +178,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<byte?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..33c6bf495d7 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,20 @@ +// <auto-generated /> +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Principals(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs index 564bf8bbcf9..c0be980d397 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,11 +38,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -52,17 +51,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)); + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); id.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -73,20 +72,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -95,22 +94,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varbinary(max)"), storeTypePostfix: StoreTypePostfix.None); blob.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -133,24 +131,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -172,8 +170,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataEntityType.cs index 0fcded4aa99..8d744e4fa5b 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,11 +38,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -52,17 +51,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -74,20 +73,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -96,29 +95,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var point = runtimeEntityType.AddProperty( "Point", typeof(Point), nullable: true); point.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), - (ValueBuffer valueBuffer) => valueBuffer[2]); + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), + Point (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 2), + Point (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), + object (ValueBuffer valueBuffer) => valueBuffer[2]); point.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -143,24 +141,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[], Point>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[], Point>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob))), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int, Point>(source.ContainsKey("Id") ? (int)source["Id"] : 0, source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int, Point>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0), (source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int, Point>(default(int), default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, Point>(default(int), default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 3, @@ -181,8 +179,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs index fed8607aef6..c9b0612784f 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); @@ -79,11 +78,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -99,11 +98,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); enumDiscriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enumDiscriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -112,27 +111,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumDiscriminator.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value), + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum1, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value))); + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))))); enumDiscriminator.SetSentinelFromProviderValue(0); var id = runtimeEntityType.AddProperty( @@ -142,20 +141,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + byte? (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => !(DependentBaseUnsafeAccessors<byte?>.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => !(DependentBaseUnsafeAccessors<byte?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(id, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(id), - (ValueBuffer valueBuffer) => valueBuffer[3]); + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(id, 3), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(id), + object (ValueBuffer valueBuffer) => valueBuffer[3]); id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -164,22 +163,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetValueComparer(new NullableValueComparer<byte>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<byte>(id.TypeMapping.KeyComparer)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { principalId, principalAlternateId }); @@ -221,19 +219,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -241,7 +239,6 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -252,19 +249,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt lazyLoadingEnabled: false); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<byte>>>(dependent), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<byte?>>(dependent), null); dependent.SetPropertyIndexes( index: 2, @@ -286,24 +283,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id))); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 4, @@ -326,11 +323,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<byte?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<byte?> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs index e234c20e6f0..417d031abe9 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 20, unicode: false); data.SetGetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[4]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[4]); data.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -61,7 +60,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = SqliteStringTypeMapping.Default; data.AddAnnotation("Relational:IsFixedLength", true); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var money = runtimeEntityType.AddProperty( "Money", @@ -70,11 +68,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas scale: 3, sentinel: 0m); money.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), - (ValueBuffer valueBuffer) => valueBuffer[5]); + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), + object (ValueBuffer valueBuffer) => valueBuffer[5]); money.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -96,24 +94,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var money = runtimeEntityType.FindProperty("Money")!; var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>, string, decimal>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data)), ((ValueComparer<decimal>)((IProperty)money).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(money))); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?, string, decimal>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data))), ((ValueComparer<decimal>)(((IProperty)money).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(money))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default, source.ContainsKey("Money") ? (decimal)source["Money"] : 0M)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("Money") ? ((decimal)(source["Money"])) : 0M))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity8)); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity8)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 6, @@ -134,8 +132,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<byte?> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs index 168afa9209f..fa5664c9edb 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs @@ -7,7 +7,6 @@ using System.Net; using System.Net.NetworkInformation; using System.Reflection; -using System.Runtime.CompilerServices; using System.Text; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -48,20 +47,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueConverter: new CompiledModelTestBase.ManyTypesIdConverter()); id.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); id.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : (entry.FlaggedAsTemporary(0) && ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -70,30 +69,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)), + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.ManyTypesId, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)))); + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)))); id.SetCurrentValueComparer(new CurrentProviderValueComparer<CompiledModelTestBase.ManyTypesId, int>(id)); id.SetSentinelFromProviderValue(0); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id", "TestNamespace") }); var @bool = runtimeEntityType.AddProperty( "Bool", @@ -102,20 +100,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); @bool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance) == false); @bool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), - (ValueBuffer valueBuffer) => valueBuffer[1]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), + object (ValueBuffer valueBuffer) => valueBuffer[1]); @bool.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -124,20 +122,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @bool.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - @bool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool", "TestNamespace") }); var boolArray = runtimeEntityType.AddProperty( "BoolArray", @@ -145,20 +142,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance) == null); + bool[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity) == null, + bool[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance) == null); boolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), - (ValueBuffer valueBuffer) => valueBuffer[2]); + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), + bool[] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), + object (ValueBuffer valueBuffer) => valueBuffer[2]); boolArray.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -167,37 +164,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool>(new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - boolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray", "TestNamespace") }); var boolNestedCollection = runtimeEntityType.AddProperty( "BoolNestedCollection", @@ -205,20 +201,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance) == null); + bool[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) == null, + bool[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance) == null); boolNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[3]); + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), + bool[][] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[3]); boolNestedCollection.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -227,17 +223,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool[]>(new JsonCollectionOfReferencesReaderWriter<bool[][], bool[]>( new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance))), @@ -246,37 +242,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool>(new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - boolNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection", "TestNamespace") }); var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", @@ -284,20 +279,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance) == false); boolToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -306,29 +301,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 1), converter: new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]), + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, string>( JsonStringReaderWriter.Instance, new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]))); + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))))); boolToStringConverterProperty.SetSentinelFromProviderValue("A"); - boolToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty", "TestNamespace") }); var boolToTwoValuesConverterProperty = runtimeEntityType.AddProperty( "BoolToTwoValuesConverterProperty", @@ -336,20 +330,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToTwoValuesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToTwoValuesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToTwoValuesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance) == false); boolToTwoValuesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -358,29 +352,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToTwoValuesConverterProperty.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1), + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, byte>( JsonByteReaderWriter.Instance, new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1))); + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1))); boolToTwoValuesConverterProperty.SetSentinelFromProviderValue((byte)0); - boolToTwoValuesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty", "TestNamespace") }); var boolToZeroOneConverterProperty = runtimeEntityType.AddProperty( "BoolToZeroOneConverterProperty", @@ -389,20 +382,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToZeroOneConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new BoolToZeroOneConverter<short>()); boolToZeroOneConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance) == false); boolToZeroOneConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[6]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -411,29 +404,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToZeroOneConverterProperty.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1), + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1))); + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1))); boolToZeroOneConverterProperty.SetSentinelFromProviderValue((short)0); - boolToZeroOneConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty", "TestNamespace") }); var bytes = runtimeEntityType.AddProperty( "Bytes", @@ -441,20 +433,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance) == null); bytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), - (ValueBuffer valueBuffer) => valueBuffer[7]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), + object (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -463,18 +455,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytes.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - bytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var bytesArray = runtimeEntityType.AddProperty( "BytesArray", @@ -482,20 +473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance) == null); bytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -504,35 +495,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - bytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var bytesNestedCollection = runtimeEntityType.AddProperty( "BytesNestedCollection", @@ -540,20 +530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance) == null); bytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[9]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[9]); bytesNestedCollection.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -562,17 +552,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[][]>(new JsonCollectionOfReferencesReaderWriter<byte[][][], byte[][]>( new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance))), @@ -581,35 +571,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonByteArrayReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())))); - bytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())))); var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", @@ -619,20 +608,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueConverter: new BytesToStringConverter(), valueComparer: new ArrayStructuralComparer<byte>()); bytesToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance) == null); bytesToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[10]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -641,26 +630,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)), + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<byte[], string>( JsonStringReaderWriter.Instance, new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)))); - bytesToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty", "TestNamespace") }); + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); var castingConverterProperty = runtimeEntityType.AddProperty( "CastingConverterProperty", @@ -669,20 +657,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CastingConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CastingConverter<int, decimal>()); castingConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance) == 0); castingConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[11]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -691,27 +679,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); castingConverterProperty.TypeMapping = SqliteDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), converter: new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v), + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, decimal>( SqliteJsonDecimalReaderWriter.Instance, new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v))); + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))))); castingConverterProperty.SetSentinelFromProviderValue(0m); - castingConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty", "TestNamespace") }); var @char = runtimeEntityType.AddProperty( "Char", @@ -720,20 +707,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Char>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: '\0'); @char.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance) == '\0'); @char.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), - (ValueBuffer valueBuffer) => valueBuffer[12]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), + object (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -742,20 +729,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @char.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); - @char.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char", "TestNamespace") }); var charArray = runtimeEntityType.AddProperty( "CharArray", @@ -763,20 +749,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance) == null); + char[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity) == null, + char[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance) == null); charArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), - (ValueBuffer valueBuffer) => valueBuffer[13]); + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), + char[] (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), + object (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -785,37 +771,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char>(new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - charArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray", "TestNamespace") }); var charNestedCollection = runtimeEntityType.AddProperty( "CharNestedCollection", @@ -823,20 +808,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance) == null); + char[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) == null, + char[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance) == null); charNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[14]); + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), + char[][] (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[14]); charNestedCollection.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -845,17 +830,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char[]>(new JsonCollectionOfReferencesReaderWriter<char[][], char[]>( new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance))), @@ -864,37 +849,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonCharReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char>(new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")))); - charNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection", "TestNamespace") }); var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", @@ -903,20 +887,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CharToStringConverter()); charToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance) == '\0'); charToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -925,29 +909,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 1), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); charToStringConverterProperty.SetSentinelFromProviderValue("\0"); - charToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty", "TestNamespace") }); var dateOnly = runtimeEntityType.AddProperty( "DateOnly", @@ -956,20 +939,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateOnly(1, 1, 1)); dateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance) == default(DateOnly)); dateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[16]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -977,7 +960,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateOnly.TypeMapping = SqliteDateOnlyTypeMapping.Default; - dateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly", "TestNamespace") }); var dateOnlyArray = runtimeEntityType.AddProperty( "DateOnlyArray", @@ -985,20 +967,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance) == null); + DateOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) == null, + DateOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance) == null); dateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), + DateOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1007,23 +989,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), keyComparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateOnly>(new JsonCollectionOfStructsReaderWriter<DateOnly[], DateOnly>( JsonDateOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateOnly[], DateOnly>( JsonDateOnlyReaderWriter.Instance), elementMapping: SqliteDateOnlyTypeMapping.Default); - dateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray", "TestNamespace") }); var dateOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "DateOnlyToStringConverterProperty", @@ -1032,20 +1013,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateOnlyToStringConverter()); dateOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance) == default(DateOnly)); dateOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1054,29 +1035,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); dateOnlyToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01"); - dateOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty", "TestNamespace") }); var dateTime = runtimeEntityType.AddProperty( "DateTime", @@ -1085,20 +1065,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance) == default(DateTime)); dateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[19]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), + object (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1106,7 +1086,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateTime.TypeMapping = SqliteDateTimeTypeMapping.Default; - dateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime", "TestNamespace") }); var dateTimeArray = runtimeEntityType.AddProperty( "DateTimeArray", @@ -1114,20 +1093,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance) == null); + DateTime[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity) == null, + DateTime[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance) == null); dateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[20]); + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1136,23 +1115,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - dateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray", "TestNamespace") }); var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBinaryConverterProperty", @@ -1161,20 +1139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBinaryConverter()); dateTimeOffsetToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1183,29 +1161,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBinaryConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); dateTimeOffsetToBinaryConverterProperty.SetSentinelFromProviderValue(0L); - dateTimeOffsetToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty", "TestNamespace") }); var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBytesConverterProperty", @@ -1214,20 +1191,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBytesConverter()); dateTimeOffsetToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1236,29 +1213,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 12), converter: new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); dateTimeOffsetToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - dateTimeOffsetToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty", "TestNamespace") }); var dateTimeOffsetToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToStringConverterProperty", @@ -1267,20 +1243,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToStringConverter()); dateTimeOffsetToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1289,29 +1265,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); dateTimeOffsetToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00+00:00"); - dateTimeOffsetToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty", "TestNamespace") }); var dateTimeToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeToBinaryConverterProperty", @@ -1320,20 +1295,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToBinaryConverter()); dateTimeToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance) == default(DateTime)); dateTimeToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[24]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1342,29 +1317,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToBinaryConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)), + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)))); + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)))); dateTimeToBinaryConverterProperty.SetSentinelFromProviderValue(0L); - dateTimeToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty", "TestNamespace") }); var dateTimeToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeToStringConverterProperty", @@ -1373,20 +1347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToStringConverter()); dateTimeToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance) == default(DateTime)); dateTimeToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[25]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1395,29 +1369,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); dateTimeToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00"); - dateTimeToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty", "TestNamespace") }); var dateTimeToTicksConverterProperty = runtimeEntityType.AddProperty( "DateTimeToTicksConverterProperty", @@ -1426,20 +1399,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTimeToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance) == default(DateTime)); dateTimeToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1447,7 +1420,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateTimeToTicksConverterProperty.TypeMapping = SqliteDateTimeTypeMapping.Default; - dateTimeToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty", "TestNamespace") }); var @decimal = runtimeEntityType.AddProperty( "Decimal", @@ -1456,20 +1428,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Decimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0m); @decimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance) == 0M); @decimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[27]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), + object (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1477,7 +1449,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); @decimal.TypeMapping = SqliteDecimalTypeMapping.Default; - @decimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal", "TestNamespace") }); var decimalArray = runtimeEntityType.AddProperty( "DecimalArray", @@ -1485,20 +1456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); decimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance) == null); + decimal[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity) == null, + decimal[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance) == null); decimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[28]); + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), + decimal[] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -1507,23 +1478,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), keyComparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<decimal>(new JsonCollectionOfStructsReaderWriter<decimal[], decimal>( SqliteJsonDecimalReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<decimal[], decimal>( SqliteJsonDecimalReaderWriter.Instance), elementMapping: SqliteDecimalTypeMapping.Default); - decimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray", "TestNamespace") }); var decimalNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToBytesConverterProperty", @@ -1532,20 +1502,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<decimal>()); decimalNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance) == 0M); decimalNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[29]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -1554,29 +1524,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)), + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)))); + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))))); decimalNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - decimalNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty", "TestNamespace") }); var decimalNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToStringConverterProperty", @@ -1585,20 +1554,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<decimal>()); decimalNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance) == 0M); decimalNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -1607,29 +1576,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, string>( JsonStringReaderWriter.Instance, new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); decimalNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - decimalNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty", "TestNamespace") }); var @double = runtimeEntityType.AddProperty( "Double", @@ -1638,20 +1606,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Double>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0.0); @double.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance).Equals(0D)); @double.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), - (ValueBuffer valueBuffer) => valueBuffer[31]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), + object (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -1660,20 +1628,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @double.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); - @double.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double", "TestNamespace") }); var doubleArray = runtimeEntityType.AddProperty( "DoubleArray", @@ -1681,20 +1648,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); doubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance) == null); + double[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity) == null, + double[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance) == null); doubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[32]); + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), + double[] (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -1703,37 +1670,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), keyComparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<double>(new JsonCollectionOfStructsReaderWriter<double[], double>( JsonDoubleReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<double[], double>( JsonDoubleReaderWriter.Instance), elementMapping: DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - doubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray", "TestNamespace") }); var doubleNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToBytesConverterProperty", @@ -1742,20 +1708,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<double>()); doubleNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance).Equals(0D)); doubleNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[33]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -1764,29 +1730,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 8), converter: new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)), + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)))); + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))))); doubleNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }); - doubleNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty", "TestNamespace") }); var doubleNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToStringConverterProperty", @@ -1795,20 +1760,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<double>()); doubleNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance).Equals(0D)); doubleNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[34]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -1817,29 +1782,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, string>( JsonStringReaderWriter.Instance, new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); doubleNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - doubleNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty", "TestNamespace") }); var enum16 = runtimeEntityType.AddProperty( "Enum16", @@ -1847,20 +1811,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), - (ValueBuffer valueBuffer) => valueBuffer[35]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), + object (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -1869,29 +1833,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); enum16.SetSentinelFromProviderValue((short)0); - enum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16", "TestNamespace") }); var enum16Array = runtimeEntityType.AddProperty( "Enum16Array", @@ -1899,20 +1862,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance) == null); enum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[36]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -1921,53 +1884,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - enum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var enum16AsString = runtimeEntityType.AddProperty( "Enum16AsString", @@ -1976,20 +1938,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[37]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -1998,27 +1960,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); enum16AsString.SetSentinelFromProviderValue("Default"); - enum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString", "TestNamespace") }); var enum16AsStringArray = runtimeEntityType.AddProperty( "Enum16AsStringArray", @@ -2026,20 +1987,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance) == null); enum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[38]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2048,51 +2009,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); - enum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); var enum16AsStringCollection = runtimeEntityType.AddProperty( "Enum16AsStringCollection", @@ -2100,20 +2060,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance) == null); enum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[39]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( index: 39, originalValueIndex: 39, @@ -2122,51 +2082,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); - enum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); var enum16Collection = runtimeEntityType.AddProperty( "Enum16Collection", @@ -2174,20 +2133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance) == null); enum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[40]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( index: 40, originalValueIndex: 40, @@ -2196,53 +2155,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - enum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var enum32 = runtimeEntityType.AddProperty( "Enum32", @@ -2250,20 +2208,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), - (ValueBuffer valueBuffer) => valueBuffer[41]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), + object (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( index: 41, originalValueIndex: 41, @@ -2272,29 +2230,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enum32.SetSentinelFromProviderValue(0); - enum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32", "TestNamespace") }); var enum32Array = runtimeEntityType.AddProperty( "Enum32Array", @@ -2302,20 +2259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance) == null); enum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[42]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( index: 42, originalValueIndex: 42, @@ -2324,53 +2281,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - enum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var enum32AsString = runtimeEntityType.AddProperty( "Enum32AsString", @@ -2379,20 +2335,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[43]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( index: 43, originalValueIndex: 43, @@ -2401,27 +2357,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enum32AsString.SetSentinelFromProviderValue("Default"); - enum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString", "TestNamespace") }); var enum32AsStringArray = runtimeEntityType.AddProperty( "Enum32AsStringArray", @@ -2429,20 +2384,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance) == null); enum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[44]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( index: 44, originalValueIndex: 44, @@ -2451,51 +2406,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); - enum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); var enum32AsStringCollection = runtimeEntityType.AddProperty( "Enum32AsStringCollection", @@ -2503,20 +2457,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance) == null); enum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[45]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( index: 45, originalValueIndex: 45, @@ -2525,51 +2479,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); - enum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); var enum32Collection = runtimeEntityType.AddProperty( "Enum32Collection", @@ -2577,20 +2530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance) == null); enum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[46]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( index: 46, originalValueIndex: 46, @@ -2599,53 +2552,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - enum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var enum32NestedCollection = runtimeEntityType.AddProperty( "Enum32NestedCollection", @@ -2653,20 +2605,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance) == null); + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) == null, + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance) == null); enum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[47]); + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[47]); enum32NestedCollection.SetPropertyIndexes( index: 47, originalValueIndex: 47, @@ -2675,109 +2627,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<List<CompiledModelTestBase.Enum32>[]>(new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<List<CompiledModelTestBase.Enum32>>(new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); - enum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); var enum64 = runtimeEntityType.AddProperty( "Enum64", @@ -2785,20 +2736,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), - (ValueBuffer valueBuffer) => valueBuffer[48]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), + object (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( index: 48, originalValueIndex: 48, @@ -2807,29 +2758,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); enum64.SetSentinelFromProviderValue(0L); - enum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64", "TestNamespace") }); var enum64Array = runtimeEntityType.AddProperty( "Enum64Array", @@ -2837,20 +2787,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance) == null); enum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[49]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( index: 49, originalValueIndex: 49, @@ -2859,53 +2809,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - enum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var enum64AsString = runtimeEntityType.AddProperty( "Enum64AsString", @@ -2914,20 +2863,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[50]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( index: 50, originalValueIndex: 50, @@ -2936,27 +2885,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); enum64AsString.SetSentinelFromProviderValue("Default"); - enum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString", "TestNamespace") }); var enum64AsStringArray = runtimeEntityType.AddProperty( "Enum64AsStringArray", @@ -2964,20 +2912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance) == null); enum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[51]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( index: 51, originalValueIndex: 51, @@ -2986,51 +2934,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); - enum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); var enum64AsStringCollection = runtimeEntityType.AddProperty( "Enum64AsStringCollection", @@ -3038,20 +2985,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance) == null); enum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[52]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( index: 52, originalValueIndex: 52, @@ -3060,51 +3007,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); - enum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); var enum64Collection = runtimeEntityType.AddProperty( "Enum64Collection", @@ -3112,20 +3058,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance) == null); enum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[53]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( index: 53, originalValueIndex: 53, @@ -3134,53 +3080,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - enum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var enum8 = runtimeEntityType.AddProperty( "Enum8", @@ -3188,20 +3133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), - (ValueBuffer valueBuffer) => valueBuffer[54]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), + object (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( index: 54, originalValueIndex: 54, @@ -3210,29 +3155,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); enum8.SetSentinelFromProviderValue((sbyte)0); - enum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8", "TestNamespace") }); var enum8Array = runtimeEntityType.AddProperty( "Enum8Array", @@ -3240,20 +3184,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance) == null); enum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[55]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( index: 55, originalValueIndex: 55, @@ -3262,53 +3206,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - enum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var enum8AsString = runtimeEntityType.AddProperty( "Enum8AsString", @@ -3317,20 +3260,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[56]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( index: 56, originalValueIndex: 56, @@ -3339,27 +3282,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); enum8AsString.SetSentinelFromProviderValue("Default"); - enum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString", "TestNamespace") }); var enum8AsStringArray = runtimeEntityType.AddProperty( "Enum8AsStringArray", @@ -3367,20 +3309,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance) == null); enum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[57]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( index: 57, originalValueIndex: 57, @@ -3389,51 +3331,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); - enum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); var enum8AsStringCollection = runtimeEntityType.AddProperty( "Enum8AsStringCollection", @@ -3441,20 +3382,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance) == null); enum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[58]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( index: 58, originalValueIndex: 58, @@ -3463,51 +3404,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); - enum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); var enum8Collection = runtimeEntityType.AddProperty( "Enum8Collection", @@ -3515,20 +3455,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance) == null); enum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[59]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( index: 59, originalValueIndex: 59, @@ -3537,53 +3477,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - enum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var enum8NestedCollection = runtimeEntityType.AddProperty( "Enum8NestedCollection", @@ -3591,20 +3530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance) == null); enum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[60]); + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[60]); enum8NestedCollection.SetPropertyIndexes( index: 60, originalValueIndex: 60, @@ -3613,80 +3552,79 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))); - enum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", @@ -3695,20 +3633,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToNumberConverter<CompiledModelTestBase.Enum32, int>()); enumToNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[61]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( index: 61, originalValueIndex: 61, @@ -3717,29 +3655,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enumToNumberConverterProperty.SetSentinelFromProviderValue(0); - enumToNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty", "TestNamespace") }); var enumToStringConverterProperty = runtimeEntityType.AddProperty( "EnumToStringConverterProperty", @@ -3748,20 +3685,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToStringConverter<CompiledModelTestBase.Enum32>()); enumToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[62]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( index: 62, originalValueIndex: 62, @@ -3770,27 +3707,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enumToStringConverterProperty.SetSentinelFromProviderValue("Default"); - enumToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty", "TestNamespace") }); var enumU16 = runtimeEntityType.AddProperty( "EnumU16", @@ -3798,20 +3734,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[63]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), + object (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( index: 63, originalValueIndex: 63, @@ -3820,29 +3756,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); enumU16.SetSentinelFromProviderValue((ushort)0); - enumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16", "TestNamespace") }); var enumU16Array = runtimeEntityType.AddProperty( "EnumU16Array", @@ -3850,20 +3785,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance) == null); enumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[64]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( index: 64, originalValueIndex: 64, @@ -3872,53 +3807,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - enumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var enumU16AsString = runtimeEntityType.AddProperty( "EnumU16AsString", @@ -3927,20 +3861,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[65]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( index: 65, originalValueIndex: 65, @@ -3949,27 +3883,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); enumU16AsString.SetSentinelFromProviderValue("Min"); - enumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString", "TestNamespace") }); var enumU16AsStringArray = runtimeEntityType.AddProperty( "EnumU16AsStringArray", @@ -3977,20 +3910,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance) == null); enumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[66]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( index: 66, originalValueIndex: 66, @@ -3999,51 +3932,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); - enumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); var enumU16AsStringCollection = runtimeEntityType.AddProperty( "EnumU16AsStringCollection", @@ -4051,20 +3983,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance) == null); enumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[67]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( index: 67, originalValueIndex: 67, @@ -4073,51 +4005,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); - enumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); var enumU16Collection = runtimeEntityType.AddProperty( "EnumU16Collection", @@ -4125,20 +4056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance) == null); enumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( index: 68, originalValueIndex: 68, @@ -4147,53 +4078,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - enumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var enumU32 = runtimeEntityType.AddProperty( "EnumU32", @@ -4201,20 +4131,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[69]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), + object (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( index: 69, originalValueIndex: 69, @@ -4223,29 +4153,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); enumU32.SetSentinelFromProviderValue(0u); - enumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32", "TestNamespace") }); var enumU32Array = runtimeEntityType.AddProperty( "EnumU32Array", @@ -4253,20 +4182,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance) == null); enumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[70]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( index: 70, originalValueIndex: 70, @@ -4275,53 +4204,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - enumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var enumU32AsString = runtimeEntityType.AddProperty( "EnumU32AsString", @@ -4330,20 +4258,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[71]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( index: 71, originalValueIndex: 71, @@ -4352,27 +4280,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); enumU32AsString.SetSentinelFromProviderValue("Min"); - enumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString", "TestNamespace") }); var enumU32AsStringArray = runtimeEntityType.AddProperty( "EnumU32AsStringArray", @@ -4380,20 +4307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance) == null); enumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[72]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( index: 72, originalValueIndex: 72, @@ -4402,51 +4329,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); - enumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); var enumU32AsStringCollection = runtimeEntityType.AddProperty( "EnumU32AsStringCollection", @@ -4454,20 +4380,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance) == null); enumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[73]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( index: 73, originalValueIndex: 73, @@ -4476,51 +4402,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); - enumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); var enumU32Collection = runtimeEntityType.AddProperty( "EnumU32Collection", @@ -4528,20 +4453,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance) == null); enumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( index: 74, originalValueIndex: 74, @@ -4550,53 +4475,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - enumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var enumU64 = runtimeEntityType.AddProperty( "EnumU64", @@ -4604,20 +4528,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[75]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), + object (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( index: 75, originalValueIndex: 75, @@ -4626,27 +4550,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); enumU64.SetSentinelFromProviderValue(0ul); - enumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64", "TestNamespace") }); var enumU64Array = runtimeEntityType.AddProperty( "EnumU64Array", @@ -4654,20 +4577,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance) == null); enumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[76]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( index: 76, originalValueIndex: 76, @@ -4676,51 +4599,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - enumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var enumU64AsString = runtimeEntityType.AddProperty( "EnumU64AsString", @@ -4729,20 +4651,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[77]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( index: 77, originalValueIndex: 77, @@ -4751,27 +4673,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); enumU64AsString.SetSentinelFromProviderValue("Min"); - enumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString", "TestNamespace") }); var enumU64AsStringArray = runtimeEntityType.AddProperty( "EnumU64AsStringArray", @@ -4779,20 +4700,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance) == null); enumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[78]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( index: 78, originalValueIndex: 78, @@ -4801,51 +4722,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); - enumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); var enumU64AsStringCollection = runtimeEntityType.AddProperty( "EnumU64AsStringCollection", @@ -4853,20 +4773,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance) == null); enumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[79]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( index: 79, originalValueIndex: 79, @@ -4875,51 +4795,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); - enumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); var enumU64Collection = runtimeEntityType.AddProperty( "EnumU64Collection", @@ -4927,20 +4846,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance) == null); enumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( index: 80, originalValueIndex: 80, @@ -4949,51 +4868,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - enumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var enumU64NestedCollection = runtimeEntityType.AddProperty( "EnumU64NestedCollection", @@ -5001,20 +4919,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance) == null); enumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[81]); enumU64NestedCollection.SetPropertyIndexes( index: 81, originalValueIndex: 81, @@ -5023,78 +4941,77 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))); - enumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); var enumU8 = runtimeEntityType.AddProperty( "EnumU8", @@ -5102,20 +5019,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[82]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), + object (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( index: 82, originalValueIndex: 82, @@ -5124,29 +5041,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); enumU8.SetSentinelFromProviderValue((byte)0); - enumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8", "TestNamespace") }); var enumU8Array = runtimeEntityType.AddProperty( "EnumU8Array", @@ -5154,20 +5070,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance) == null); enumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[83]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( index: 83, originalValueIndex: 83, @@ -5176,53 +5092,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - enumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var enumU8AsString = runtimeEntityType.AddProperty( "EnumU8AsString", @@ -5231,20 +5146,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[84]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( index: 84, originalValueIndex: 84, @@ -5253,27 +5168,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); enumU8AsString.SetSentinelFromProviderValue("Min"); - enumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString", "TestNamespace") }); var enumU8AsStringArray = runtimeEntityType.AddProperty( "EnumU8AsStringArray", @@ -5281,20 +5195,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance) == null); enumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( index: 85, originalValueIndex: 85, @@ -5303,51 +5217,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); - enumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); var enumU8AsStringCollection = runtimeEntityType.AddProperty( "EnumU8AsStringCollection", @@ -5355,20 +5268,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance) == null); enumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[86]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( index: 86, originalValueIndex: 86, @@ -5377,51 +5290,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); - enumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); var enumU8Collection = runtimeEntityType.AddProperty( "EnumU8Collection", @@ -5429,20 +5341,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance) == null); enumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[87]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( index: 87, originalValueIndex: 87, @@ -5451,53 +5363,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - enumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var @float = runtimeEntityType.AddProperty( "Float", @@ -5506,20 +5417,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Float>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0f); @float.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity).Equals(0F), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance).Equals(0F)); + float (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity).Equals(0F), + float (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance).Equals(0F)); @float.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), - (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), - (ValueBuffer valueBuffer) => valueBuffer[88]); + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), + float (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), + object (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( index: 88, originalValueIndex: 88, @@ -5528,20 +5439,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @float.TypeMapping = FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); - @float.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float", "TestNamespace") }); var floatArray = runtimeEntityType.AddProperty( "FloatArray", @@ -5549,20 +5459,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("FloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<FloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); floatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance) == null); + float[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity) == null, + float[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance) == null); floatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), - (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), + float[] (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), + object (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( index: 89, originalValueIndex: 89, @@ -5571,37 +5481,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); floatArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), keyComparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<float>(new JsonCollectionOfStructsReaderWriter<float[], float>( JsonFloatReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<float[], float>( JsonFloatReaderWriter.Instance), elementMapping: FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - floatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray", "TestNamespace") }); var guid = runtimeEntityType.AddProperty( "Guid", @@ -5610,20 +5519,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Guid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); guid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), - (ValueBuffer valueBuffer) => valueBuffer[90]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), + object (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( index: 90, originalValueIndex: 90, @@ -5631,7 +5540,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); guid.TypeMapping = SqliteGuidTypeMapping.Default; - guid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid", "TestNamespace") }); var guidArray = runtimeEntityType.AddProperty( "GuidArray", @@ -5639,20 +5547,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance) == null); + Guid[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity) == null, + Guid[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance) == null); guidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[91]); + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), + Guid[] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), + object (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( index: 91, originalValueIndex: 91, @@ -5661,23 +5569,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid>(new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default); - guidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray", "TestNamespace") }); var guidNestedCollection = runtimeEntityType.AddProperty( "GuidNestedCollection", @@ -5685,20 +5592,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance) == null); + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) == null, + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance) == null); guidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[92]); + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[92]); guidNestedCollection.SetPropertyIndexes( index: 92, originalValueIndex: 92, @@ -5707,17 +5614,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid[][]>(new JsonCollectionOfReferencesReaderWriter<List<Guid[][]>, Guid[][]>( new JsonCollectionOfReferencesReaderWriter<Guid[][], Guid[]>( new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( @@ -5728,17 +5635,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid[]>(new JsonCollectionOfReferencesReaderWriter<Guid[][], Guid[]>( new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance))), @@ -5747,23 +5654,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid>(new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default))); - guidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection", "TestNamespace") }); var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", @@ -5772,20 +5678,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToBytesConverter()); guidToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[93]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( index: 93, originalValueIndex: 93, @@ -5794,29 +5700,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)), + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)))); + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)))); guidToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - guidToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty", "TestNamespace") }); var guidToStringConverterProperty = runtimeEntityType.AddProperty( "GuidToStringConverterProperty", @@ -5825,20 +5730,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToStringConverter()); guidToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[94]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( index: 94, originalValueIndex: 94, @@ -5847,29 +5752,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 36), converter: new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)), + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, string>( JsonStringReaderWriter.Instance, new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)))); + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); guidToStringConverterProperty.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); - guidToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty", "TestNamespace") }); var iPAddress = runtimeEntityType.AddProperty( "IPAddress", @@ -5877,20 +5781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance) == null); iPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[95]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( index: 95, originalValueIndex: 95, @@ -5899,28 +5803,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - iPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var iPAddressArray = runtimeEntityType.AddProperty( "IPAddressArray", @@ -5928,20 +5831,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance) == null); iPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[96]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( index: 96, originalValueIndex: 96, @@ -5950,53 +5853,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - iPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var iPAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "IPAddressToBytesConverterProperty", @@ -6005,20 +5907,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToBytesConverter()); iPAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance) == null); iPAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[97]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( index: 97, originalValueIndex: 97, @@ -6027,28 +5929,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)), + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)))); - iPAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty", "TestNamespace") }); + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)))); var iPAddressToStringConverterProperty = runtimeEntityType.AddProperty( "IPAddressToStringConverterProperty", @@ -6057,20 +5958,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToStringConverter()); iPAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance) == null); iPAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[98]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( index: 98, originalValueIndex: 98, @@ -6079,28 +5980,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - iPAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var int16 = runtimeEntityType.AddProperty( "Int16", @@ -6109,20 +6009,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (short)0); int16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance) == 0); + short (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity) == 0, + short (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance) == 0); int16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), - (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), - (ValueBuffer valueBuffer) => valueBuffer[99]); + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), + short (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), + object (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( index: 99, originalValueIndex: 99, @@ -6131,20 +6031,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16", "TestNamespace") }); var int16Array = runtimeEntityType.AddProperty( "Int16Array", @@ -6152,20 +6051,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance) == null); + short[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity) == null, + short[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance) == null); int16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), - (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[100]); + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), + short[] (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), + object (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( index: 100, originalValueIndex: 100, @@ -6174,37 +6073,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<short[], short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<short[], short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array", "TestNamespace") }); var int32 = runtimeEntityType.AddProperty( "Int32", @@ -6213,20 +6111,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); int32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance) == 0); int32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), - (ValueBuffer valueBuffer) => valueBuffer[101]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), + object (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( index: 101, originalValueIndex: 101, @@ -6235,20 +6133,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32", "TestNamespace") }); var int32Array = runtimeEntityType.AddProperty( "Int32Array", @@ -6256,20 +6153,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance) == null); + int[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity) == null, + int[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance) == null); int32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[102]); + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), + int[] (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), + object (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( index: 102, originalValueIndex: 102, @@ -6278,37 +6175,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int>(new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array", "TestNamespace") }); var int32NestedCollection = runtimeEntityType.AddProperty( "Int32NestedCollection", @@ -6316,20 +6212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance) == null); + int[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) == null, + int[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance) == null); int32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[103]); + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), + int[][] (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[103]); int32NestedCollection.SetPropertyIndexes( index: 103, originalValueIndex: 103, @@ -6338,17 +6234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int[]>(new JsonCollectionOfReferencesReaderWriter<int[][], int[]>( new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance))), @@ -6357,37 +6253,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int>(new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - int32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection", "TestNamespace") }); var int64 = runtimeEntityType.AddProperty( "Int64", @@ -6396,20 +6291,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0L); int64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) == 0L, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance) == 0L); + long (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity) == 0L, + long (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance) == 0L); int64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), - (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), - (ValueBuffer valueBuffer) => valueBuffer[104]); + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), + long (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), + object (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( index: 104, originalValueIndex: 104, @@ -6418,20 +6313,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64", "TestNamespace") }); var int64Array = runtimeEntityType.AddProperty( "Int64Array", @@ -6439,20 +6333,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance) == null); + long[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity) == null, + long[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance) == null); int64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), - (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[105]); + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), + long[] (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), + object (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( index: 105, originalValueIndex: 105, @@ -6461,37 +6355,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long>(new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array", "TestNamespace") }); var int64NestedCollection = runtimeEntityType.AddProperty( "Int64NestedCollection", @@ -6499,20 +6392,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance) == null); + IList<long[]>[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) == null, + IList<long[]>[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance) == null); int64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[106]); + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), + IList<long[]>[] (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[106]); int64NestedCollection.SetPropertyIndexes( index: 106, originalValueIndex: 106, @@ -6521,17 +6414,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IList<long[]>>(new JsonCollectionOfReferencesReaderWriter<IList<long[]>[], IList<long[]>>( new JsonCollectionOfReferencesReaderWriter<List<long[]>, long[]>( new JsonCollectionOfStructsReaderWriter<long[], long>( @@ -6542,17 +6435,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long[]>(new JsonCollectionOfReferencesReaderWriter<List<long[]>, long[]>( new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance))), @@ -6561,37 +6454,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long>(new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - int64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection", "TestNamespace") }); var int8 = runtimeEntityType.AddProperty( "Int8", @@ -6600,20 +6492,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (sbyte)0); int8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance) == 0); + sbyte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity) == 0, + sbyte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance) == 0); int8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), - (ValueBuffer valueBuffer) => valueBuffer[107]); + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), + sbyte (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), + object (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( index: 107, originalValueIndex: 107, @@ -6622,20 +6514,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8", "TestNamespace") }); var int8Array = runtimeEntityType.AddProperty( "Int8Array", @@ -6643,20 +6534,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance) == null); + sbyte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity) == null, + sbyte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance) == null); int8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[108]); + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), + sbyte[] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), + object (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( index: 108, originalValueIndex: 108, @@ -6665,37 +6556,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte>(new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array", "TestNamespace") }); var int8NestedCollection = runtimeEntityType.AddProperty( "Int8NestedCollection", @@ -6703,20 +6593,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance) == null); + sbyte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) == null, + sbyte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance) == null); int8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[109]); + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), + sbyte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[109]); int8NestedCollection.SetPropertyIndexes( index: 109, originalValueIndex: 109, @@ -6725,17 +6615,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte[][]>(new JsonCollectionOfReferencesReaderWriter<sbyte[][][], sbyte[][]>( new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( @@ -6746,17 +6636,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonSByteReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte[]>(new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance))), @@ -6765,37 +6655,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonSByteReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte>(new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - int8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection", "TestNamespace") }); var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", @@ -6804,20 +6693,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<int>()); intNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance) == 0); intNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[110]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( index: 110, originalValueIndex: 110, @@ -6826,29 +6715,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 4), converter: new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)), + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)))); + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))))); intNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0 }); - intNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty", "TestNamespace") }); var intNumberToStringConverterProperty = runtimeEntityType.AddProperty( "IntNumberToStringConverterProperty", @@ -6857,20 +6745,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<int>()); intNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance) == 0); intNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[111]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( index: 111, originalValueIndex: 111, @@ -6879,29 +6767,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, string>( JsonStringReaderWriter.Instance, new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); intNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - intNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty", "TestNamespace") }); var nullIntToNullStringConverterProperty = runtimeEntityType.AddProperty( "NullIntToNullStringConverterProperty", @@ -6911,20 +6798,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullable: true, valueConverter: new CompiledModelTestBase.NullIntToNullStringConverter()); nullIntToNullStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance).HasValue)); nullIntToNullStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullIntToNullStringConverterProperty, 112), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[112]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullIntToNullStringConverterProperty, 112), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullIntToNullStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( index: 112, originalValueIndex: 112, @@ -6933,28 +6820,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullIntToNullStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), keyComparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int?, string>( JsonStringReaderWriter.Instance, new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true))); - nullIntToNullStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty", "TestNamespace") }); var nullableBool = runtimeEntityType.AddProperty( "NullableBool", @@ -6963,20 +6849,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance).HasValue); + bool? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableBool(entity).HasValue), + bool? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableBool(instance).HasValue)); nullableBool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>>(nullableBool, 113), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[113]); + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => entry.ReadOriginalValue<bool?>(nullableBool, 113), + bool? (InternalEntityEntry entry) => entry.GetCurrentValue<bool?>(nullableBool), + object (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( index: 113, originalValueIndex: 113, @@ -6985,22 +6871,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBool.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableBool.SetValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.Comparer)); nullableBool.SetKeyValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.KeyComparer)); - nullableBool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool", "TestNamespace") }); var nullableBoolArray = runtimeEntityType.AddProperty( "NullableBoolArray", @@ -7008,20 +6893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBoolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance) == null); + bool? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) == null, + bool? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance) == null); nullableBoolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>[]>(nullableBoolArray, 114), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool? []>(nullableBoolArray, 114), + bool? [] (InternalEntityEntry entry) => entry.GetCurrentValue<bool? []>(nullableBoolArray), + object (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( index: 114, originalValueIndex: 114, @@ -7030,37 +6915,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool?>(new JsonCollectionOfNullableStructsReaderWriter<bool?[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<bool?[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableBoolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray", "TestNamespace") }); var nullableBytes = runtimeEntityType.AddProperty( "NullableBytes", @@ -7069,20 +6953,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance) == null); nullableBytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[115]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), + object (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( index: 115, originalValueIndex: 115, @@ -7091,18 +6975,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytes.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - nullableBytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var nullableBytesArray = runtimeEntityType.AddProperty( "NullableBytesArray", @@ -7110,20 +6993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance) == null); nullableBytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( index: 116, originalValueIndex: 116, @@ -7132,35 +7015,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - nullableBytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var nullableBytesNestedCollection = runtimeEntityType.AddProperty( "NullableBytesNestedCollection", @@ -7168,20 +7050,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance) == null); nullableBytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[117]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[117]); nullableBytesNestedCollection.SetPropertyIndexes( index: 117, originalValueIndex: 117, @@ -7190,17 +7072,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[][]>(new JsonCollectionOfReferencesReaderWriter<byte[][][], byte[][]>( new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance))), @@ -7209,35 +7091,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonByteArrayReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())))); - nullableBytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())))); var nullableChar = runtimeEntityType.AddProperty( "NullableChar", @@ -7246,20 +7127,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableChar>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableChar.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance).HasValue); + char? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableChar(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableChar(entity).HasValue), + char? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableChar(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableChar(instance).HasValue)); nullableChar.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>>(nullableChar, 118), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[118]); + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => entry.ReadOriginalValue<char?>(nullableChar, 118), + char? (InternalEntityEntry entry) => entry.GetCurrentValue<char?>(nullableChar), + object (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( index: 118, originalValueIndex: 118, @@ -7268,22 +7149,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableChar.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); nullableChar.SetValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.Comparer)); nullableChar.SetKeyValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.KeyComparer)); - nullableChar.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar", "TestNamespace") }); var nullableCharArray = runtimeEntityType.AddProperty( "NullableCharArray", @@ -7291,20 +7171,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableCharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableCharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableCharArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance) == null); + char? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity) == null, + char? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance) == null); nullableCharArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>[]>(nullableCharArray, 119), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[119]); + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<char? []>(nullableCharArray, 119), + char? [] (InternalEntityEntry entry) => entry.GetCurrentValue<char? []>(nullableCharArray), + object (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( index: 119, originalValueIndex: 119, @@ -7313,37 +7193,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char?>(new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - nullableCharArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray", "TestNamespace") }); var nullableDateOnly = runtimeEntityType.AddProperty( "NullableDateOnly", @@ -7352,20 +7231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance).HasValue); + DateOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateOnly(entity).HasValue), + DateOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateOnly(instance).HasValue)); nullableDateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>>(nullableDateOnly, 120), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[120]); + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly?>(nullableDateOnly, 120), + DateOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly?>(nullableDateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( index: 120, originalValueIndex: 120, @@ -7375,7 +7254,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnly.TypeMapping = SqliteDateOnlyTypeMapping.Default; nullableDateOnly.SetValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.Comparer)); nullableDateOnly.SetKeyValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.KeyComparer)); - nullableDateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly", "TestNamespace") }); var nullableDateOnlyArray = runtimeEntityType.AddProperty( "NullableDateOnlyArray", @@ -7383,20 +7261,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance) == null); + DateOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) == null, + DateOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance) == null); nullableDateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>[]>(nullableDateOnlyArray, 121), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[121]); + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly? []>(nullableDateOnlyArray, 121), + DateOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( index: 121, originalValueIndex: 121, @@ -7405,23 +7283,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateOnly?>(new JsonCollectionOfNullableStructsReaderWriter<DateOnly?[], DateOnly>( JsonDateOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<DateOnly?[], DateOnly>( JsonDateOnlyReaderWriter.Instance), elementMapping: SqliteDateOnlyTypeMapping.Default); - nullableDateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray", "TestNamespace") }); var nullableDateTime = runtimeEntityType.AddProperty( "NullableDateTime", @@ -7430,20 +7307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance).HasValue); + DateTime? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateTime(entity).HasValue), + DateTime? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateTime(instance).HasValue)); nullableDateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>>(nullableDateTime, 122), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[122]); + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime?>(nullableDateTime, 122), + DateTime? (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime?>(nullableDateTime), + object (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( index: 122, originalValueIndex: 122, @@ -7453,7 +7330,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTime.TypeMapping = SqliteDateTimeTypeMapping.Default; nullableDateTime.SetValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.Comparer)); nullableDateTime.SetKeyValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.KeyComparer)); - nullableDateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime", "TestNamespace") }); var nullableDateTimeArray = runtimeEntityType.AddProperty( "NullableDateTimeArray", @@ -7461,20 +7337,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance) == null); + DateTime? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) == null, + DateTime? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance) == null); nullableDateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>[]>(nullableDateTimeArray, 123), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[123]); + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime? []>(nullableDateTimeArray, 123), + DateTime? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime? []>(nullableDateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( index: 123, originalValueIndex: 123, @@ -7483,23 +7359,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime?>(new JsonCollectionOfNullableStructsReaderWriter<DateTime?[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<DateTime?[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - nullableDateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray", "TestNamespace") }); var nullableDecimal = runtimeEntityType.AddProperty( "NullableDecimal", @@ -7508,20 +7383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDecimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance).HasValue); + decimal? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDecimal(entity).HasValue), + decimal? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDecimal(instance).HasValue)); nullableDecimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>>(nullableDecimal, 124), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[124]); + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal?>(nullableDecimal, 124), + decimal? (InternalEntityEntry entry) => entry.GetCurrentValue<decimal?>(nullableDecimal), + object (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( index: 124, originalValueIndex: 124, @@ -7531,7 +7406,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimal.TypeMapping = SqliteDecimalTypeMapping.Default; nullableDecimal.SetValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.Comparer)); nullableDecimal.SetKeyValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.KeyComparer)); - nullableDecimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal", "TestNamespace") }); var nullableDecimalArray = runtimeEntityType.AddProperty( "NullableDecimalArray", @@ -7539,20 +7413,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDecimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance) == null); + decimal? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) == null, + decimal? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance) == null); nullableDecimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>[]>(nullableDecimalArray, 125), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[125]); + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal? []>(nullableDecimalArray, 125), + decimal? [] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal? []>(nullableDecimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( index: 125, originalValueIndex: 125, @@ -7561,23 +7435,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), keyComparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<decimal?>(new JsonCollectionOfNullableStructsReaderWriter<decimal?[], decimal>( SqliteJsonDecimalReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<decimal?[], decimal>( SqliteJsonDecimalReaderWriter.Instance), elementMapping: SqliteDecimalTypeMapping.Default); - nullableDecimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray", "TestNamespace") }); var nullableDouble = runtimeEntityType.AddProperty( "NullableDouble", @@ -7586,20 +7459,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDouble>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDouble.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance).HasValue); + double? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDouble(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDouble(entity).HasValue), + double? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDouble(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDouble(instance).HasValue)); nullableDouble.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>>(nullableDouble, 126), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[126]); + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => entry.ReadOriginalValue<double?>(nullableDouble, 126), + double? (InternalEntityEntry entry) => entry.GetCurrentValue<double?>(nullableDouble), + object (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( index: 126, originalValueIndex: 126, @@ -7608,22 +7481,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDouble.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); nullableDouble.SetValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.Comparer)); nullableDouble.SetKeyValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.KeyComparer)); - nullableDouble.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble", "TestNamespace") }); var nullableDoubleArray = runtimeEntityType.AddProperty( "NullableDoubleArray", @@ -7631,20 +7503,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDoubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance) == null); + double? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) == null, + double? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance) == null); nullableDoubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>[]>(nullableDoubleArray, 127), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[127]); + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<double? []>(nullableDoubleArray, 127), + double? [] (InternalEntityEntry entry) => entry.GetCurrentValue<double? []>(nullableDoubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( index: 127, originalValueIndex: 127, @@ -7653,37 +7525,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), keyComparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<double?>(new JsonCollectionOfNullableStructsReaderWriter<double?[], double>( JsonDoubleReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<double?[], double>( JsonDoubleReaderWriter.Instance), elementMapping: DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - nullableDoubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray", "TestNamespace") }); var nullableEnum16 = runtimeEntityType.AddProperty( "NullableEnum16", @@ -7692,20 +7563,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16(instance).HasValue)); nullableEnum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16, 128), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[128]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16, 128), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16), + object (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( index: 128, originalValueIndex: 128, @@ -7714,30 +7585,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.Comparer)); nullableEnum16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.KeyComparer)); - nullableEnum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16", "TestNamespace") }); var nullableEnum16Array = runtimeEntityType.AddProperty( "NullableEnum16Array", @@ -7745,20 +7615,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance) == null); nullableEnum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array, 129), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[129]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array, 129), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( index: 129, originalValueIndex: 129, @@ -7767,53 +7637,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16AsString = runtimeEntityType.AddProperty( "NullableEnum16AsString", @@ -7822,20 +7691,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(instance).HasValue)); nullableEnum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString, 130), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[130]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString, 130), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( index: 130, originalValueIndex: 130, @@ -7844,30 +7713,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsString.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.Comparer)); nullableEnum16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.KeyComparer)); - nullableEnum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString", "TestNamespace") }); var nullableEnum16AsStringArray = runtimeEntityType.AddProperty( "NullableEnum16AsStringArray", @@ -7875,20 +7743,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance) == null); nullableEnum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray, 131), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[131]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray, 131), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( index: 131, originalValueIndex: 131, @@ -7897,53 +7765,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum16AsStringCollection", @@ -7951,20 +7818,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance) == null); nullableEnum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection, 132), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[132]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection, 132), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( index: 132, originalValueIndex: 132, @@ -7973,53 +7840,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16Collection = runtimeEntityType.AddProperty( "NullableEnum16Collection", @@ -8027,20 +7893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance) == null); nullableEnum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection, 133), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection, 133), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( index: 133, originalValueIndex: 133, @@ -8049,53 +7915,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum32 = runtimeEntityType.AddProperty( "NullableEnum32", @@ -8104,20 +7969,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32(instance).HasValue)); nullableEnum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32, 134), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[134]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32, 134), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32), + object (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( index: 134, originalValueIndex: 134, @@ -8126,30 +7991,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.Comparer)); nullableEnum32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.KeyComparer)); - nullableEnum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32", "TestNamespace") }); var nullableEnum32Array = runtimeEntityType.AddProperty( "NullableEnum32Array", @@ -8157,20 +8021,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance) == null); nullableEnum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array, 135), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[135]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array, 135), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( index: 135, originalValueIndex: 135, @@ -8179,53 +8043,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32AsString = runtimeEntityType.AddProperty( "NullableEnum32AsString", @@ -8234,20 +8097,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(instance).HasValue)); nullableEnum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString, 136), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[136]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString, 136), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( index: 136, originalValueIndex: 136, @@ -8256,30 +8119,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.Comparer)); nullableEnum32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.KeyComparer)); - nullableEnum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString", "TestNamespace") }); var nullableEnum32AsStringArray = runtimeEntityType.AddProperty( "NullableEnum32AsStringArray", @@ -8287,20 +8149,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance) == null); nullableEnum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray, 137), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[137]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray, 137), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( index: 137, originalValueIndex: 137, @@ -8309,53 +8171,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum32AsStringCollection", @@ -8363,20 +8224,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance) == null); nullableEnum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection, 138), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[138]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection, 138), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( index: 138, originalValueIndex: 138, @@ -8385,53 +8246,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32Collection = runtimeEntityType.AddProperty( "NullableEnum32Collection", @@ -8439,20 +8299,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance) == null); nullableEnum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection, 139), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection, 139), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( index: 139, originalValueIndex: 139, @@ -8461,53 +8321,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( "NullableEnum32NestedCollection", @@ -8515,20 +8374,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance) == null); + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) == null, + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance) == null); nullableEnum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection, 140), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection, 140), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[140]); nullableEnum32NestedCollection.SetPropertyIndexes( index: 140, originalValueIndex: 140, @@ -8537,109 +8396,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?[][]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); - nullableEnum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", @@ -8648,20 +8506,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64(instance).HasValue)); nullableEnum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64, 141), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[141]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64, 141), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64), + object (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( index: 141, originalValueIndex: 141, @@ -8670,30 +8528,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.Comparer)); nullableEnum64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.KeyComparer)); - nullableEnum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64", "TestNamespace") }); var nullableEnum64Array = runtimeEntityType.AddProperty( "NullableEnum64Array", @@ -8701,20 +8558,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance) == null); nullableEnum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array, 142), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array, 142), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( index: 142, originalValueIndex: 142, @@ -8723,53 +8580,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64AsString = runtimeEntityType.AddProperty( "NullableEnum64AsString", @@ -8778,20 +8634,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(instance).HasValue)); nullableEnum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString, 143), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString, 143), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( index: 143, originalValueIndex: 143, @@ -8800,30 +8656,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsString.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.Comparer)); nullableEnum64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.KeyComparer)); - nullableEnum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString", "TestNamespace") }); var nullableEnum64AsStringArray = runtimeEntityType.AddProperty( "NullableEnum64AsStringArray", @@ -8831,20 +8686,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance) == null); nullableEnum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray, 144), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray, 144), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( index: 144, originalValueIndex: 144, @@ -8853,53 +8708,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum64AsStringCollection", @@ -8907,20 +8761,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance) == null); nullableEnum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection, 145), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection, 145), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( index: 145, originalValueIndex: 145, @@ -8929,53 +8783,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64Collection = runtimeEntityType.AddProperty( "NullableEnum64Collection", @@ -8983,20 +8836,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance) == null); nullableEnum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection, 146), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection, 146), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( index: 146, originalValueIndex: 146, @@ -9005,53 +8858,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum8 = runtimeEntityType.AddProperty( "NullableEnum8", @@ -9060,20 +8912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8(instance).HasValue)); nullableEnum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8, 147), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[147]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8, 147), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8), + object (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( index: 147, originalValueIndex: 147, @@ -9082,30 +8934,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.Comparer)); nullableEnum8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.KeyComparer)); - nullableEnum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8", "TestNamespace") }); var nullableEnum8Array = runtimeEntityType.AddProperty( "NullableEnum8Array", @@ -9113,20 +8964,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance) == null); nullableEnum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array, 148), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array, 148), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( index: 148, originalValueIndex: 148, @@ -9135,53 +8986,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8AsString = runtimeEntityType.AddProperty( "NullableEnum8AsString", @@ -9190,20 +9040,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(instance).HasValue)); nullableEnum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString, 149), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString, 149), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( index: 149, originalValueIndex: 149, @@ -9212,30 +9062,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsString.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.Comparer)); nullableEnum8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.KeyComparer)); - nullableEnum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString", "TestNamespace") }); var nullableEnum8AsStringArray = runtimeEntityType.AddProperty( "NullableEnum8AsStringArray", @@ -9243,20 +9092,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance) == null); nullableEnum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray, 150), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray, 150), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( index: 150, originalValueIndex: 150, @@ -9265,53 +9114,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum8AsStringCollection", @@ -9319,20 +9167,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance) == null); nullableEnum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection, 151), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection, 151), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( index: 151, originalValueIndex: 151, @@ -9341,53 +9189,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8Collection = runtimeEntityType.AddProperty( "NullableEnum8Collection", @@ -9395,20 +9242,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance) == null); nullableEnum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection, 152), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection, 152), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( index: 152, originalValueIndex: 152, @@ -9417,53 +9264,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( "NullableEnum8NestedCollection", @@ -9471,20 +9317,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance) == null); nullableEnum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection, 153), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[153]); + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection, 153), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[153]); nullableEnum8NestedCollection.SetPropertyIndexes( index: 153, originalValueIndex: 153, @@ -9493,80 +9339,79 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))); - nullableEnum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", @@ -9575,20 +9420,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16(instance).HasValue)); nullableEnumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16, 154), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[154]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16, 154), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16), + object (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( index: 154, originalValueIndex: 154, @@ -9597,30 +9442,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.Comparer)); nullableEnumU16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.KeyComparer)); - nullableEnumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16", "TestNamespace") }); var nullableEnumU16Array = runtimeEntityType.AddProperty( "NullableEnumU16Array", @@ -9628,20 +9472,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance) == null); nullableEnumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array, 155), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[155]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array, 155), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( index: 155, originalValueIndex: 155, @@ -9650,53 +9494,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16AsString = runtimeEntityType.AddProperty( "NullableEnumU16AsString", @@ -9705,20 +9548,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance).HasValue)); nullableEnumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString, 156), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[156]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString, 156), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( index: 156, originalValueIndex: 156, @@ -9727,30 +9570,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsString.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.Comparer)); nullableEnumU16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.KeyComparer)); - nullableEnumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString", "TestNamespace") }); var nullableEnumU16AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU16AsStringArray", @@ -9758,20 +9600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance) == null); nullableEnumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray, 157), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[157]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray, 157), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( index: 157, originalValueIndex: 157, @@ -9780,53 +9622,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU16AsStringCollection", @@ -9834,20 +9675,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance) == null); nullableEnumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection, 158), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection, 158), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( index: 158, originalValueIndex: 158, @@ -9856,53 +9697,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16Collection = runtimeEntityType.AddProperty( "NullableEnumU16Collection", @@ -9910,20 +9750,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance) == null); nullableEnumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection, 159), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[159]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection, 159), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( index: 159, originalValueIndex: 159, @@ -9932,53 +9772,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU32 = runtimeEntityType.AddProperty( "NullableEnumU32", @@ -9987,20 +9826,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32(instance).HasValue)); nullableEnumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32, 160), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[160]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32, 160), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32), + object (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( index: 160, originalValueIndex: 160, @@ -10009,30 +9848,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.Comparer)); nullableEnumU32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.KeyComparer)); - nullableEnumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32", "TestNamespace") }); var nullableEnumU32Array = runtimeEntityType.AddProperty( "NullableEnumU32Array", @@ -10040,20 +9878,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance) == null); nullableEnumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array, 161), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[161]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array, 161), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( index: 161, originalValueIndex: 161, @@ -10062,53 +9900,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32AsString = runtimeEntityType.AddProperty( "NullableEnumU32AsString", @@ -10117,20 +9954,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance).HasValue)); nullableEnumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString, 162), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[162]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString, 162), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( index: 162, originalValueIndex: 162, @@ -10139,30 +9976,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsString.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.Comparer)); nullableEnumU32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.KeyComparer)); - nullableEnumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString", "TestNamespace") }); var nullableEnumU32AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU32AsStringArray", @@ -10170,20 +10006,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance) == null); nullableEnumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray, 163), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[163]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray, 163), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( index: 163, originalValueIndex: 163, @@ -10192,53 +10028,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU32AsStringCollection", @@ -10246,20 +10081,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance) == null); nullableEnumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection, 164), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection, 164), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( index: 164, originalValueIndex: 164, @@ -10268,53 +10103,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32Collection = runtimeEntityType.AddProperty( "NullableEnumU32Collection", @@ -10322,20 +10156,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance) == null); nullableEnumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection, 165), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[165]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection, 165), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( index: 165, originalValueIndex: 165, @@ -10344,53 +10178,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU64 = runtimeEntityType.AddProperty( "NullableEnumU64", @@ -10399,20 +10232,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64(instance).HasValue)); nullableEnumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64, 166), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[166]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64, 166), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64), + object (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( index: 166, originalValueIndex: 166, @@ -10421,28 +10254,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); nullableEnumU64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.Comparer)); nullableEnumU64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.KeyComparer)); - nullableEnumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64", "TestNamespace") }); var nullableEnumU64Array = runtimeEntityType.AddProperty( "NullableEnumU64Array", @@ -10450,20 +10282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance) == null); nullableEnumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array, 167), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[167]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array, 167), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( index: 167, originalValueIndex: 167, @@ -10472,51 +10304,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64AsString = runtimeEntityType.AddProperty( "NullableEnumU64AsString", @@ -10525,20 +10356,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance).HasValue)); nullableEnumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString, 168), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[168]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString, 168), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( index: 168, originalValueIndex: 168, @@ -10547,28 +10378,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsString.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); nullableEnumU64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.Comparer)); nullableEnumU64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.KeyComparer)); - nullableEnumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString", "TestNamespace") }); var nullableEnumU64AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU64AsStringArray", @@ -10576,20 +10406,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance) == null); nullableEnumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray, 169), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[169]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray, 169), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( index: 169, originalValueIndex: 169, @@ -10598,51 +10428,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU64AsStringCollection", @@ -10650,20 +10479,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance) == null); nullableEnumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection, 170), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[170]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection, 170), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( index: 170, originalValueIndex: 170, @@ -10672,51 +10501,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64Collection = runtimeEntityType.AddProperty( "NullableEnumU64Collection", @@ -10724,20 +10552,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance) == null); nullableEnumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection, 171), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[171]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection, 171), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( index: 171, originalValueIndex: 171, @@ -10746,51 +10574,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( "NullableEnumU64NestedCollection", @@ -10798,20 +10625,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance) == null); nullableEnumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection, 172), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[172]); + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection, 172), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[172]); nullableEnumU64NestedCollection.SetPropertyIndexes( index: 172, originalValueIndex: 172, @@ -10820,78 +10647,77 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))); - nullableEnumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", @@ -10900,20 +10726,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8(instance).HasValue)); nullableEnumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8, 173), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[173]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8, 173), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8), + object (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( index: 173, originalValueIndex: 173, @@ -10922,30 +10748,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.Comparer)); nullableEnumU8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.KeyComparer)); - nullableEnumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8", "TestNamespace") }); var nullableEnumU8Array = runtimeEntityType.AddProperty( "NullableEnumU8Array", @@ -10953,20 +10778,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance) == null); nullableEnumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array, 174), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array, 174), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( index: 174, originalValueIndex: 174, @@ -10975,53 +10800,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8AsString = runtimeEntityType.AddProperty( "NullableEnumU8AsString", @@ -11030,20 +10854,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance).HasValue)); nullableEnumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString, 175), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[175]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString, 175), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( index: 175, originalValueIndex: 175, @@ -11052,30 +10876,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsString.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.Comparer)); nullableEnumU8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.KeyComparer)); - nullableEnumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString", "TestNamespace") }); var nullableEnumU8AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU8AsStringArray", @@ -11083,20 +10906,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance) == null); nullableEnumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray, 176), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[176]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray, 176), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( index: 176, originalValueIndex: 176, @@ -11105,53 +10928,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU8AsStringCollection", @@ -11159,20 +10981,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance) == null); nullableEnumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection, 177), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[177]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection, 177), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( index: 177, originalValueIndex: 177, @@ -11181,53 +11003,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8Collection = runtimeEntityType.AddProperty( "NullableEnumU8Collection", @@ -11235,20 +11056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance) == null); nullableEnumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection, 178), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[178]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection, 178), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( index: 178, originalValueIndex: 178, @@ -11257,53 +11078,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableFloat = runtimeEntityType.AddProperty( "NullableFloat", @@ -11312,20 +11132,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloat>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableFloat.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance).HasValue); + float? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloat(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableFloat(entity).HasValue), + float? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloat(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableFloat(instance).HasValue)); nullableFloat.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>>(nullableFloat, 179), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[179]); + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => entry.ReadOriginalValue<float?>(nullableFloat, 179), + float? (InternalEntityEntry entry) => entry.GetCurrentValue<float?>(nullableFloat), + object (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( index: 179, originalValueIndex: 179, @@ -11334,22 +11154,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloat.TypeMapping = FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); nullableFloat.SetValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.Comparer)); nullableFloat.SetKeyValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.KeyComparer)); - nullableFloat.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat", "TestNamespace") }); var nullableFloatArray = runtimeEntityType.AddProperty( "NullableFloatArray", @@ -11357,20 +11176,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableFloatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance) == null); + float? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) == null, + float? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance) == null); nullableFloatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>[]>(nullableFloatArray, 180), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<float? []>(nullableFloatArray, 180), + float? [] (InternalEntityEntry entry) => entry.GetCurrentValue<float? []>(nullableFloatArray), + object (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( index: 180, originalValueIndex: 180, @@ -11379,37 +11198,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), keyComparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<float?>(new JsonCollectionOfNullableStructsReaderWriter<float?[], float>( JsonFloatReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<float?[], float>( JsonFloatReaderWriter.Instance), elementMapping: FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - nullableFloatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray", "TestNamespace") }); var nullableGuid = runtimeEntityType.AddProperty( "NullableGuid", @@ -11418,20 +11236,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableGuid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance).HasValue); + Guid? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableGuid(entity).HasValue), + Guid? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableGuid(instance).HasValue)); nullableGuid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>>(nullableGuid, 181), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[181]); + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid?>(nullableGuid, 181), + Guid? (InternalEntityEntry entry) => entry.GetCurrentValue<Guid?>(nullableGuid), + object (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( index: 181, originalValueIndex: 181, @@ -11441,7 +11259,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuid.TypeMapping = SqliteGuidTypeMapping.Default; nullableGuid.SetValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.Comparer)); nullableGuid.SetKeyValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.KeyComparer)); - nullableGuid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid", "TestNamespace") }); var nullableGuidArray = runtimeEntityType.AddProperty( "NullableGuidArray", @@ -11449,20 +11266,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance) == null); + Guid? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) == null, + Guid? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance) == null); nullableGuidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[]>(nullableGuidArray, 182), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? []>(nullableGuidArray, 182), + Guid? [] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? []>(nullableGuidArray), + object (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( index: 182, originalValueIndex: 182, @@ -11471,23 +11288,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?>(new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default); - nullableGuidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray", "TestNamespace") }); var nullableGuidNestedCollection = runtimeEntityType.AddProperty( "NullableGuidNestedCollection", @@ -11495,20 +11311,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance) == null); + Guid? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) == null, + Guid? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance) == null); nullableGuidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[][]>(nullableGuidNestedCollection, 183), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[183]); + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? [][]>(nullableGuidNestedCollection, 183), + Guid? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[183]); nullableGuidNestedCollection.SetPropertyIndexes( index: 183, originalValueIndex: 183, @@ -11517,17 +11333,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?[]>(new JsonCollectionOfReferencesReaderWriter<Guid?[][], Guid?[]>( new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance))), @@ -11536,23 +11352,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?>(new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default)); - nullableGuidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection", "TestNamespace") }); var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", @@ -11561,20 +11376,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableIPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance) == null); nullableIPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[184]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( index: 184, originalValueIndex: 184, @@ -11583,28 +11398,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - nullableIPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var nullableIPAddressArray = runtimeEntityType.AddProperty( "NullableIPAddressArray", @@ -11612,20 +11426,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableIPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance) == null); nullableIPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[185]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( index: 185, originalValueIndex: 185, @@ -11634,53 +11448,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - nullableIPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var nullableInt16 = runtimeEntityType.AddProperty( "NullableInt16", @@ -11689,20 +11502,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance).HasValue); + short? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt16(entity).HasValue), + short? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt16(instance).HasValue)); nullableInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>>(nullableInt16, 186), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[186]); + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => entry.ReadOriginalValue<short?>(nullableInt16, 186), + short? (InternalEntityEntry entry) => entry.GetCurrentValue<short?>(nullableInt16), + object (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( index: 186, originalValueIndex: 186, @@ -11711,22 +11524,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt16.SetValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.Comparer)); nullableInt16.SetKeyValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.KeyComparer)); - nullableInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16", "TestNamespace") }); var nullableInt16Array = runtimeEntityType.AddProperty( "NullableInt16Array", @@ -11734,20 +11546,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance) == null); + short? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) == null, + short? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance) == null); nullableInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>[]>(nullableInt16Array, 187), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[187]); + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<short? []>(nullableInt16Array, 187), + short? [] (InternalEntityEntry entry) => entry.GetCurrentValue<short? []>(nullableInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( index: 187, originalValueIndex: 187, @@ -11756,37 +11568,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), keyComparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short?>(new JsonCollectionOfNullableStructsReaderWriter<short?[], short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<short?[], short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array", "TestNamespace") }); var nullableInt32 = runtimeEntityType.AddProperty( "NullableInt32", @@ -11795,20 +11606,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt32(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt32(instance).HasValue)); nullableInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullableInt32, 188), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[188]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullableInt32, 188), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullableInt32), + object (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( index: 188, originalValueIndex: 188, @@ -11817,22 +11628,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt32.SetValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.Comparer)); nullableInt32.SetKeyValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.KeyComparer)); - nullableInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32", "TestNamespace") }); var nullableInt32Array = runtimeEntityType.AddProperty( "NullableInt32Array", @@ -11840,20 +11650,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance) == null); + int? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) == null, + int? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance) == null); nullableInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[]>(nullableInt32Array, 189), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[189]); + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? []>(nullableInt32Array, 189), + int? [] (InternalEntityEntry entry) => entry.GetCurrentValue<int? []>(nullableInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( index: 189, originalValueIndex: 189, @@ -11862,37 +11672,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?>(new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array", "TestNamespace") }); var nullableInt32NestedCollection = runtimeEntityType.AddProperty( "NullableInt32NestedCollection", @@ -11900,20 +11709,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance) == null); + int? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) == null, + int? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance) == null); nullableInt32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[][]>(nullableInt32NestedCollection, 190), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[190]); + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? [][]>(nullableInt32NestedCollection, 190), + int? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<int? [][]>(nullableInt32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[190]); nullableInt32NestedCollection.SetPropertyIndexes( index: 190, originalValueIndex: 190, @@ -11922,17 +11731,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), keyComparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?[]>(new JsonCollectionOfReferencesReaderWriter<int?[][], int?[]>( new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance))), @@ -11941,37 +11750,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?>(new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - nullableInt32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection", "TestNamespace") }); var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", @@ -11980,20 +11788,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance).HasValue); + long? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt64(entity).HasValue), + long? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt64(instance).HasValue)); nullableInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(nullableInt64, 191), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(nullableInt64, 191), + long? (InternalEntityEntry entry) => entry.GetCurrentValue<long?>(nullableInt64), + object (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( index: 191, originalValueIndex: 191, @@ -12002,22 +11810,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt64.SetValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.Comparer)); nullableInt64.SetKeyValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.KeyComparer)); - nullableInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64", "TestNamespace") }); var nullableInt64Array = runtimeEntityType.AddProperty( "NullableInt64Array", @@ -12025,20 +11832,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance) == null); + long? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) == null, + long? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance) == null); nullableInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>[]>(nullableInt64Array, 192), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<long? []>(nullableInt64Array, 192), + long? [] (InternalEntityEntry entry) => entry.GetCurrentValue<long? []>(nullableInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( index: 192, originalValueIndex: 192, @@ -12047,37 +11854,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?>(new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array", "TestNamespace") }); var nullableInt64NestedCollection = runtimeEntityType.AddProperty( "NullableInt64NestedCollection", @@ -12085,20 +11891,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance) == null); + List<long? [][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) == null, + List<long? [][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance) == null); nullableInt64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection, 193), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[193]); + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<long? [][]>>(nullableInt64NestedCollection, 193), + List<long? [][]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[193]); nullableInt64NestedCollection.SetPropertyIndexes( index: 193, originalValueIndex: 193, @@ -12107,17 +11913,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), keyComparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?[][]>(new JsonCollectionOfReferencesReaderWriter<List<long?[][]>, long?[][]>( new JsonCollectionOfReferencesReaderWriter<long?[][], long?[]>( new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( @@ -12128,17 +11934,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?[]>(new JsonCollectionOfReferencesReaderWriter<long?[][], long?[]>( new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance))), @@ -12147,37 +11953,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?>(new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - nullableInt64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection", "TestNamespace") }); var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", @@ -12186,20 +11991,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance).HasValue); + sbyte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt8(entity).HasValue), + sbyte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt8(instance).HasValue)); nullableInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>>(nullableInt8, 194), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[194]); + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte?>(nullableInt8, 194), + sbyte? (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte?>(nullableInt8), + object (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( index: 194, originalValueIndex: 194, @@ -12208,22 +12013,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt8.SetValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.Comparer)); nullableInt8.SetKeyValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.KeyComparer)); - nullableInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8", "TestNamespace") }); var nullableInt8Array = runtimeEntityType.AddProperty( "NullableInt8Array", @@ -12231,20 +12035,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance) == null); + sbyte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) == null, + sbyte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance) == null); nullableInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>[]>(nullableInt8Array, 195), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[195]); + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte? []>(nullableInt8Array, 195), + sbyte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte? []>(nullableInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( index: 195, originalValueIndex: 195, @@ -12253,37 +12057,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte?>(new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array", "TestNamespace") }); var nullablePhysicalAddress = runtimeEntityType.AddProperty( "NullablePhysicalAddress", @@ -12292,20 +12095,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullablePhysicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance) == null); nullablePhysicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[196]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( index: 196, originalValueIndex: 196, @@ -12314,28 +12117,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - nullablePhysicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var nullablePhysicalAddressArray = runtimeEntityType.AddProperty( "NullablePhysicalAddressArray", @@ -12343,20 +12145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance) == null); nullablePhysicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[197]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( index: 197, originalValueIndex: 197, @@ -12365,53 +12167,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); - nullablePhysicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( "NullablePhysicalAddressNestedCollection", @@ -12419,20 +12220,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance) == null); + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) == null, + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance) == null); nullablePhysicalAddressNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[198]); + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[198]); nullablePhysicalAddressNestedCollection.SetPropertyIndexes( index: 198, originalValueIndex: 198, @@ -12441,109 +12242,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress[][]>(new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress[]>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))); - nullablePhysicalAddressNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -12552,20 +12352,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance) == null); nullableString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[199]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), + object (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( index: 199, originalValueIndex: 199, @@ -12573,7 +12373,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); nullableString.TypeMapping = SqliteStringTypeMapping.Default; - nullableString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString", "TestNamespace") }); var nullableStringArray = runtimeEntityType.AddProperty( "NullableStringArray", @@ -12581,20 +12380,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance) == null); nullableStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[200]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( index: 200, originalValueIndex: 200, @@ -12603,23 +12402,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - nullableStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray", "TestNamespace") }); var nullableStringNestedCollection = runtimeEntityType.AddProperty( "NullableStringNestedCollection", @@ -12627,20 +12425,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance) == null); nullableStringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[201]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[201]); nullableStringNestedCollection.SetPropertyIndexes( index: 201, originalValueIndex: 201, @@ -12649,17 +12447,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string[]>(new JsonCollectionOfReferencesReaderWriter<string[][], string[]>( new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance))), @@ -12668,23 +12466,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default)); - nullableStringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection", "TestNamespace") }); var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", @@ -12693,20 +12490,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance).HasValue); + TimeOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(entity).HasValue), + TimeOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(instance).HasValue)); nullableTimeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>>(nullableTimeOnly, 202), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[202]); + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly?>(nullableTimeOnly, 202), + TimeOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly?>(nullableTimeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( index: 202, originalValueIndex: 202, @@ -12716,7 +12513,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnly.TypeMapping = SqliteTimeOnlyTypeMapping.Default; nullableTimeOnly.SetValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.Comparer)); nullableTimeOnly.SetKeyValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.KeyComparer)); - nullableTimeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly", "TestNamespace") }); var nullableTimeOnlyArray = runtimeEntityType.AddProperty( "NullableTimeOnlyArray", @@ -12724,20 +12520,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance) == null); + TimeOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) == null, + TimeOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance) == null); nullableTimeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray, 203), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[203]); + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly? []>(nullableTimeOnlyArray, 203), + TimeOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( index: 203, originalValueIndex: 203, @@ -12746,23 +12542,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeOnly?>(new JsonCollectionOfNullableStructsReaderWriter<TimeOnly?[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<TimeOnly?[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqliteTimeOnlyTypeMapping.Default); - nullableTimeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray", "TestNamespace") }); var nullableTimeSpan = runtimeEntityType.AddProperty( "NullableTimeSpan", @@ -12771,20 +12566,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance).HasValue); + TimeSpan? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(entity).HasValue), + TimeSpan? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(instance).HasValue)); nullableTimeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>>(nullableTimeSpan, 204), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[204]); + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan?>(nullableTimeSpan, 204), + TimeSpan? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan?>(nullableTimeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( index: 204, originalValueIndex: 204, @@ -12793,22 +12588,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpan.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); nullableTimeSpan.SetValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.Comparer)); nullableTimeSpan.SetKeyValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.KeyComparer)); - nullableTimeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan", "TestNamespace") }); var nullableTimeSpanArray = runtimeEntityType.AddProperty( "NullableTimeSpanArray", @@ -12816,20 +12610,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance) == null); + TimeSpan? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) == null, + TimeSpan? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance) == null); nullableTimeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray, 205), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[205]); + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan? []>(nullableTimeSpanArray, 205), + TimeSpan? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( index: 205, originalValueIndex: 205, @@ -12838,37 +12632,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeSpan?>(new JsonCollectionOfNullableStructsReaderWriter<TimeSpan?[], TimeSpan>( JsonTimeSpanReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<TimeSpan?[], TimeSpan>( JsonTimeSpanReaderWriter.Instance), elementMapping: TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - nullableTimeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray", "TestNamespace") }); var nullableUInt16 = runtimeEntityType.AddProperty( "NullableUInt16", @@ -12877,20 +12670,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance).HasValue); + ushort? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt16(entity).HasValue), + ushort? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt16(instance).HasValue)); nullableUInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>>(nullableUInt16, 206), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[206]); + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort?>(nullableUInt16, 206), + ushort? (InternalEntityEntry entry) => entry.GetCurrentValue<ushort?>(nullableUInt16), + object (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( index: 206, originalValueIndex: 206, @@ -12899,22 +12692,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt16.SetValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.Comparer)); nullableUInt16.SetKeyValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.KeyComparer)); - nullableUInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16", "TestNamespace") }); var nullableUInt16Array = runtimeEntityType.AddProperty( "NullableUInt16Array", @@ -12922,20 +12714,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance) == null); + ushort? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) == null, + ushort? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance) == null); nullableUInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>[]>(nullableUInt16Array, 207), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[207]); + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort? []>(nullableUInt16Array, 207), + ushort? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort? []>(nullableUInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( index: 207, originalValueIndex: 207, @@ -12944,37 +12736,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ushort?>(new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( JsonUInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( JsonUInt16ReaderWriter.Instance), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array", "TestNamespace") }); var nullableUInt32 = runtimeEntityType.AddProperty( "NullableUInt32", @@ -12983,20 +12774,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance).HasValue); + uint? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt32(entity).HasValue), + uint? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt32(instance).HasValue)); nullableUInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>>(nullableUInt32, 208), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[208]); + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => entry.ReadOriginalValue<uint?>(nullableUInt32, 208), + uint? (InternalEntityEntry entry) => entry.GetCurrentValue<uint?>(nullableUInt32), + object (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( index: 208, originalValueIndex: 208, @@ -13005,22 +12796,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt32.SetValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.Comparer)); nullableUInt32.SetKeyValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.KeyComparer)); - nullableUInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32", "TestNamespace") }); var nullableUInt32Array = runtimeEntityType.AddProperty( "NullableUInt32Array", @@ -13028,20 +12818,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance) == null); + uint? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) == null, + uint? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance) == null); nullableUInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>[]>(nullableUInt32Array, 209), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[209]); + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint? []>(nullableUInt32Array, 209), + uint? [] (InternalEntityEntry entry) => entry.GetCurrentValue<uint? []>(nullableUInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( index: 209, originalValueIndex: 209, @@ -13050,37 +12840,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), keyComparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<uint?>(new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( JsonUInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( JsonUInt32ReaderWriter.Instance), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array", "TestNamespace") }); var nullableUInt64 = runtimeEntityType.AddProperty( "NullableUInt64", @@ -13089,20 +12878,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance).HasValue); + ulong? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt64(entity).HasValue), + ulong? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt64(instance).HasValue)); nullableUInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>>(nullableUInt64, 210), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[210]); + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong?>(nullableUInt64, 210), + ulong? (InternalEntityEntry entry) => entry.GetCurrentValue<ulong?>(nullableUInt64), + object (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( index: 210, originalValueIndex: 210, @@ -13112,7 +12901,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64.TypeMapping = SqliteULongTypeMapping.Default; nullableUInt64.SetValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.Comparer)); nullableUInt64.SetKeyValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.KeyComparer)); - nullableUInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64", "TestNamespace") }); var nullableUInt64Array = runtimeEntityType.AddProperty( "NullableUInt64Array", @@ -13120,20 +12908,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance) == null); + ulong? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) == null, + ulong? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance) == null); nullableUInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>[]>(nullableUInt64Array, 211), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[211]); + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong? []>(nullableUInt64Array, 211), + ulong? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong? []>(nullableUInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( index: 211, originalValueIndex: 211, @@ -13142,23 +12930,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ulong?>(new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( JsonUInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( JsonUInt64ReaderWriter.Instance), elementMapping: SqliteULongTypeMapping.Default); - nullableUInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array", "TestNamespace") }); var nullableUInt8 = runtimeEntityType.AddProperty( "NullableUInt8", @@ -13167,20 +12954,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance).HasValue); + byte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt8(entity).HasValue), + byte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt8(instance).HasValue)); nullableUInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(nullableUInt8, 212), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[212]); + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(nullableUInt8, 212), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(nullableUInt8), + object (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( index: 212, originalValueIndex: 212, @@ -13189,22 +12976,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt8.SetValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.Comparer)); nullableUInt8.SetKeyValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.KeyComparer)); - nullableUInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8", "TestNamespace") }); var nullableUInt8Array = runtimeEntityType.AddProperty( "NullableUInt8Array", @@ -13212,20 +12998,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance) == null); + byte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) == null, + byte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance) == null); nullableUInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[]>(nullableUInt8Array, 213), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[213]); + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? []>(nullableUInt8Array, 213), + byte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? []>(nullableUInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( index: 213, originalValueIndex: 213, @@ -13234,37 +13020,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?>(new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array", "TestNamespace") }); var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( "NullableUInt8NestedCollection", @@ -13272,20 +13057,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance) == null); + byte? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) == null, + byte? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance) == null); nullableUInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[][]>(nullableUInt8NestedCollection, 214), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[214]); + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? [][]>(nullableUInt8NestedCollection, 214), + byte? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[214]); nullableUInt8NestedCollection.SetPropertyIndexes( index: 214, originalValueIndex: 214, @@ -13294,17 +13079,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?[]>(new JsonCollectionOfReferencesReaderWriter<byte?[][], byte?[]>( new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance))), @@ -13313,37 +13098,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?>(new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - nullableUInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection", "TestNamespace") }); var nullableUri = runtimeEntityType.AddProperty( "NullableUri", @@ -13352,20 +13136,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance) == null); nullableUri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[215]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), + object (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( index: 215, originalValueIndex: 215, @@ -13374,26 +13158,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUri.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - nullableUri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var nullableUriArray = runtimeEntityType.AddProperty( "NullableUriArray", @@ -13401,20 +13184,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance) == null); nullableUriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[216]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), + object (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( index: 216, originalValueIndex: 216, @@ -13423,51 +13206,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Uri>(new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); - nullableUriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); var physicalAddress = runtimeEntityType.AddProperty( "PhysicalAddress", @@ -13475,20 +13257,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance) == null); physicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[217]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( index: 217, originalValueIndex: 217, @@ -13497,28 +13279,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - physicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var physicalAddressArray = runtimeEntityType.AddProperty( "PhysicalAddressArray", @@ -13526,20 +13307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance) == null); physicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( index: 218, originalValueIndex: 218, @@ -13548,53 +13329,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); - physicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); var physicalAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToBytesConverterProperty", @@ -13603,20 +13383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToBytesConverter()); physicalAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance) == null); physicalAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( index: 219, originalValueIndex: 219, @@ -13625,28 +13405,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 8), converter: new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)), + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)))); - physicalAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty", "TestNamespace") }); + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)))); var physicalAddressToStringConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToStringConverterProperty", @@ -13655,20 +13434,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToStringConverter()); physicalAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance) == null); physicalAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( index: 220, originalValueIndex: 220, @@ -13677,28 +13456,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - physicalAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var @string = runtimeEntityType.AddProperty( "String", @@ -13706,20 +13484,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("String", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<String>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @string.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance) == null); @string.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), - (ValueBuffer valueBuffer) => valueBuffer[221]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), + object (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( index: 221, originalValueIndex: 221, @@ -13727,7 +13505,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); @string.TypeMapping = SqliteStringTypeMapping.Default; - @string.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String", "TestNamespace") }); var stringArray = runtimeEntityType.AddProperty( "StringArray", @@ -13735,20 +13512,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance) == null); stringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), + object (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( index: 222, originalValueIndex: 222, @@ -13757,23 +13534,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - stringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray", "TestNamespace") }); var stringNestedCollection = runtimeEntityType.AddProperty( "StringNestedCollection", @@ -13781,20 +13557,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance) == null); stringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[223]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[223]); stringNestedCollection.SetPropertyIndexes( index: 223, originalValueIndex: 223, @@ -13803,17 +13579,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string[]>(new JsonCollectionOfReferencesReaderWriter<string[][], string[]>( new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance))), @@ -13822,23 +13598,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default)); - stringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection", "TestNamespace") }); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -13847,20 +13622,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBoolConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToBoolConverter()); stringToBoolConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance) == null); stringToBoolConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( index: 224, originalValueIndex: 224, @@ -13869,28 +13644,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBoolConverterProperty.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)), + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, bool>( JsonBoolReaderWriter.Instance, new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)))); - stringToBoolConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty", "TestNamespace") }); + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)))); var stringToBytesConverterProperty = runtimeEntityType.AddProperty( "StringToBytesConverterProperty", @@ -13899,20 +13673,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); stringToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance) == null); stringToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[225]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( index: 225, originalValueIndex: 225, @@ -13921,26 +13695,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), converter: new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); - stringToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty", "TestNamespace") }); + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); var stringToCharConverterProperty = runtimeEntityType.AddProperty( "StringToCharConverterProperty", @@ -13949,20 +13722,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToCharConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToCharConverter()); stringToCharConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance) == null); stringToCharConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[226]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( index: 226, originalValueIndex: 226, @@ -13971,29 +13744,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToCharConverterProperty.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT", size: 1), converter: new ValueConverter<string, char>( - (string v) => v.Length < 1 ? '\0' : v[0], - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, char>( JsonCharReaderWriter.Instance, new ValueConverter<string, char>( - (string v) => v.Length < 1 ? '\0' : v[0], - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToCharConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty", "TestNamespace") }); + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToDateOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToDateOnlyConverterProperty", @@ -14002,20 +13774,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateOnlyConverter()); stringToDateOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance) == null); stringToDateOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[227]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( index: 227, originalValueIndex: 227, @@ -14024,28 +13796,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateOnlyConverterProperty.TypeMapping = SqliteDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateOnly>( JsonDateOnlyReaderWriter.Instance, new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); - stringToDateOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty", "TestNamespace") }); + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); var stringToDateTimeConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeConverterProperty", @@ -14054,20 +13825,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeConverter()); stringToDateTimeConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance) == null); stringToDateTimeConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[228]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( index: 228, originalValueIndex: 228, @@ -14076,28 +13847,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeConverterProperty.TypeMapping = SqliteDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTime>( SqliteJsonDateTimeReaderWriter.Instance, new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); - stringToDateTimeConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty", "TestNamespace") }); + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); var stringToDateTimeOffsetConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeOffsetConverterProperty", @@ -14106,20 +13876,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeOffsetConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeOffsetConverter()); stringToDateTimeOffsetConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance) == null); stringToDateTimeOffsetConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[229]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( index: 229, originalValueIndex: 229, @@ -14128,28 +13898,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeOffsetConverterProperty.TypeMapping = SqliteDateTimeOffsetTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTimeOffset>( SqliteJsonDateTimeOffsetReaderWriter.Instance, new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); - stringToDateTimeOffsetConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty", "TestNamespace") }); + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); var stringToDecimalNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDecimalNumberConverterProperty", @@ -14158,20 +13927,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDecimalNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<decimal>()); stringToDecimalNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance) == null); stringToDecimalNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[230]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( index: 230, originalValueIndex: 230, @@ -14180,28 +13949,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDecimalNumberConverterProperty.TypeMapping = SqliteDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, decimal>( SqliteJsonDecimalReaderWriter.Instance, new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToDecimalNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty", "TestNamespace") }); + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToDoubleNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDoubleNumberConverterProperty", @@ -14210,20 +13978,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDoubleNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<double>()); stringToDoubleNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance) == null); stringToDoubleNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[231]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( index: 231, originalValueIndex: 231, @@ -14232,29 +14000,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDoubleNumberConverterProperty.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL", size: 64), converter: new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, double>( JsonDoubleReaderWriter.Instance, new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)))); - stringToDoubleNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty", "TestNamespace") }); + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))))); var stringToEnumConverterProperty = runtimeEntityType.AddProperty( "StringToEnumConverterProperty", @@ -14263,20 +14030,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToEnumConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToEnumConverter<CompiledModelTestBase.EnumU32>()); stringToEnumConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance) == null); stringToEnumConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[232]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( index: 232, originalValueIndex: 232, @@ -14285,28 +14052,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToEnumConverterProperty.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<string, uint>( - (string v) => (uint)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (uint value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()), + uint (string v) => ((uint)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<string, uint>( - (string v) => (uint)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (uint value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()))); - stringToEnumConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty", "TestNamespace") }); + uint (string v) => ((uint)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()))); var stringToGuidConverterProperty = runtimeEntityType.AddProperty( "StringToGuidConverterProperty", @@ -14314,20 +14080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToGuidConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToGuidConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringToGuidConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance) == null); stringToGuidConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[233]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( index: 233, originalValueIndex: 233, @@ -14335,7 +14101,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); stringToGuidConverterProperty.TypeMapping = SqliteStringTypeMapping.Default; - stringToGuidConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty", "TestNamespace") }); var stringToIntNumberConverterProperty = runtimeEntityType.AddProperty( "StringToIntNumberConverterProperty", @@ -14344,20 +14109,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToIntNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<int>()); stringToIntNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance) == null); stringToIntNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[234]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( index: 234, originalValueIndex: 234, @@ -14366,29 +14131,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToIntNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER", size: 64), converter: new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToIntNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty", "TestNamespace") }); + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToTimeOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToTimeOnlyConverterProperty", @@ -14397,20 +14161,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeOnlyConverter()); stringToTimeOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance) == null); stringToTimeOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( index: 235, originalValueIndex: 235, @@ -14419,28 +14183,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeOnlyConverterProperty.TypeMapping = SqliteTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeOnly>( JsonTimeOnlyReaderWriter.Instance, new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")))); - stringToTimeOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty", "TestNamespace") }); + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))))); var stringToTimeSpanConverterProperty = runtimeEntityType.AddProperty( "StringToTimeSpanConverterProperty", @@ -14449,20 +14212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeSpanConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeSpanConverter()); stringToTimeSpanConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance) == null); stringToTimeSpanConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[236]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( index: 236, originalValueIndex: 236, @@ -14471,29 +14234,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeSpanConverterProperty.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT", size: 48), converter: new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeSpan>( JsonTimeSpanReaderWriter.Instance, new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")))); - stringToTimeSpanConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty", "TestNamespace") }); + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")))); var stringToUriConverterProperty = runtimeEntityType.AddProperty( "StringToUriConverterProperty", @@ -14502,20 +14264,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToUriConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToUriConverter()); stringToUriConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance) == null); stringToUriConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[237]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( index: 237, originalValueIndex: 237, @@ -14524,26 +14286,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToUriConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); - stringToUriConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty", "TestNamespace") }); + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); var timeOnly = runtimeEntityType.AddProperty( "TimeOnly", @@ -14552,20 +14313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeOnly(0, 0, 0)); timeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance) == default(TimeOnly)); timeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[238]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( index: 238, originalValueIndex: 238, @@ -14573,7 +14334,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); timeOnly.TypeMapping = SqliteTimeOnlyTypeMapping.Default; - timeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly", "TestNamespace") }); var timeOnlyArray = runtimeEntityType.AddProperty( "TimeOnlyArray", @@ -14581,20 +14341,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance) == null); + TimeOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) == null, + TimeOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance) == null); timeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[239]); + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), + TimeOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( index: 239, originalValueIndex: 239, @@ -14603,23 +14363,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), keyComparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeOnly>(new JsonCollectionOfStructsReaderWriter<TimeOnly[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<TimeOnly[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqliteTimeOnlyTypeMapping.Default); - timeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray", "TestNamespace") }); var timeOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToStringConverterProperty", @@ -14628,20 +14387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToStringConverter()); timeOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); timeOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[240]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( index: 240, originalValueIndex: 240, @@ -14650,29 +14409,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); timeOnlyToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); - timeOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty", "TestNamespace") }); var timeOnlyToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToTicksConverterProperty", @@ -14681,20 +14439,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToTicksConverter()); timeOnlyToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); timeOnlyToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[241]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( index: 241, originalValueIndex: 241, @@ -14703,29 +14461,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToTicksConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)), + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)))); + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)))); timeOnlyToTicksConverterProperty.SetSentinelFromProviderValue(0L); - timeOnlyToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty", "TestNamespace") }); var timeSpan = runtimeEntityType.AddProperty( "TimeSpan", @@ -14734,20 +14491,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeSpan(0, 0, 0, 0, 0)); timeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance) == default(TimeSpan)); timeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[242]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( index: 242, originalValueIndex: 242, @@ -14756,20 +14513,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpan.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); - timeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan", "TestNamespace") }); var timeSpanArray = runtimeEntityType.AddProperty( "TimeSpanArray", @@ -14777,20 +14533,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance) == null); + TimeSpan[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) == null, + TimeSpan[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance) == null); timeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[243]); + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), + TimeSpan[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( index: 243, originalValueIndex: 243, @@ -14799,37 +14555,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), keyComparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeSpan>(new JsonCollectionOfStructsReaderWriter<TimeSpan[], TimeSpan>( JsonTimeSpanReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<TimeSpan[], TimeSpan>( JsonTimeSpanReaderWriter.Instance), elementMapping: TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - timeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray", "TestNamespace") }); var timeSpanToStringConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToStringConverterProperty", @@ -14838,20 +14593,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToStringConverter()); timeSpanToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); timeSpanToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[244]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( index: 244, originalValueIndex: 244, @@ -14860,29 +14615,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); timeSpanToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); - timeSpanToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty", "TestNamespace") }); var timeSpanToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToTicksConverterProperty", @@ -14891,20 +14645,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToTicksConverter()); timeSpanToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); timeSpanToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[245]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( index: 245, originalValueIndex: 245, @@ -14913,29 +14667,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToTicksConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)), + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)))); + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)))); timeSpanToTicksConverterProperty.SetSentinelFromProviderValue(0L); - timeSpanToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty", "TestNamespace") }); var uInt16 = runtimeEntityType.AddProperty( "UInt16", @@ -14944,20 +14697,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (ushort)0); uInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance) == 0); + ushort (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity) == 0, + ushort (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance) == 0); uInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[246]); + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), + ushort (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), + object (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( index: 246, originalValueIndex: 246, @@ -14966,20 +14719,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16", "TestNamespace") }); var uInt16Array = runtimeEntityType.AddProperty( "UInt16Array", @@ -14987,20 +14739,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance) == null); + ushort[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity) == null, + ushort[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance) == null); uInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[247]); + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), + ushort[] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( index: 247, originalValueIndex: 247, @@ -15009,37 +14761,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), keyComparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ushort>(new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( JsonUInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( JsonUInt16ReaderWriter.Instance), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - uInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array", "TestNamespace") }); var uInt32 = runtimeEntityType.AddProperty( "UInt32", @@ -15048,20 +14799,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0u); uInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) == 0U, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance) == 0U); + uint (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity) == 0U, + uint (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance) == 0U); uInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[248]); + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), + uint (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), + object (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( index: 248, originalValueIndex: 248, @@ -15070,20 +14821,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32", "TestNamespace") }); var uInt32Array = runtimeEntityType.AddProperty( "UInt32Array", @@ -15091,20 +14841,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance) == null); + uint[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity) == null, + uint[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance) == null); uInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[249]); + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), + uint[] (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( index: 249, originalValueIndex: 249, @@ -15113,37 +14863,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), keyComparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<uint>(new JsonCollectionOfStructsReaderWriter<uint[], uint>( JsonUInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<uint[], uint>( JsonUInt32ReaderWriter.Instance), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - uInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array", "TestNamespace") }); var uInt64 = runtimeEntityType.AddProperty( "UInt64", @@ -15152,20 +14901,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0ul); uInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) == 0UL, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance) == 0UL); + ulong (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity) == 0UL, + ulong (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance) == 0UL); uInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[250]); + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), + ulong (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), + object (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( index: 250, originalValueIndex: 250, @@ -15173,7 +14922,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); uInt64.TypeMapping = SqliteULongTypeMapping.Default; - uInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64", "TestNamespace") }); var uInt64Array = runtimeEntityType.AddProperty( "UInt64Array", @@ -15181,20 +14929,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance) == null); + ulong[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity) == null, + ulong[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance) == null); uInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[251]); + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), + ulong[] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( index: 251, originalValueIndex: 251, @@ -15203,23 +14951,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), keyComparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ulong>(new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( JsonUInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( JsonUInt64ReaderWriter.Instance), elementMapping: SqliteULongTypeMapping.Default); - uInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array", "TestNamespace") }); var uInt8 = runtimeEntityType.AddProperty( "UInt8", @@ -15228,20 +14975,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (byte)0); uInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance) == 0); + byte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity) == 0, + byte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance) == 0); uInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[252]); + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), + byte (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), + object (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( index: 252, originalValueIndex: 252, @@ -15250,20 +14997,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8", "TestNamespace") }); var uInt8Array = runtimeEntityType.AddProperty( "UInt8Array", @@ -15271,20 +15017,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance) == null); uInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[253]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( index: 253, originalValueIndex: 253, @@ -15293,18 +15039,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8Array.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - uInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var uInt8NestedCollection = runtimeEntityType.AddProperty( "UInt8NestedCollection", @@ -15312,20 +15057,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance) == null); + List<byte[]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) == null, + List<byte[]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance) == null); uInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[254]); + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), + List<byte[]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[254]); uInt8NestedCollection.SetPropertyIndexes( index: 254, originalValueIndex: 254, @@ -15334,35 +15079,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<List<byte[]>, byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<byte[]>, byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - uInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var uri = runtimeEntityType.AddProperty( "Uri", @@ -15370,20 +15114,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Uri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Uri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance) == null); uri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), - (ValueBuffer valueBuffer) => valueBuffer[255]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), + object (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( index: 255, originalValueIndex: 255, @@ -15392,26 +15136,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uri.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - uri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var uriArray = runtimeEntityType.AddProperty( "UriArray", @@ -15419,20 +15162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance) == null); uriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[256]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), + object (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( index: 256, originalValueIndex: 256, @@ -15441,51 +15184,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Uri>(new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); - uriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); var uriToStringConverterProperty = runtimeEntityType.AddProperty( "UriToStringConverterProperty", @@ -15494,20 +15236,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new UriToStringConverter()); uriToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance) == null); uriToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[257]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( index: 257, originalValueIndex: 257, @@ -15516,26 +15258,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - uriToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var key = runtimeEntityType.AddKey( new[] { id }); @@ -15808,40 +15549,40 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<CompiledModelTestBase.ManyTypesId>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<CompiledModelTestBase.ManyTypesId>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)((IProperty)@bool).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(@bool)), (IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray) == null ? null : (bool[])((ValueComparer<IEnumerable<bool>>)((IProperty)boolArray).GetValueComparer()).Snapshot((IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray)), (object)source.GetCurrentValue<bool[][]>(boolNestedCollection) == null ? null : (bool[][])((ValueComparer<object>)((IProperty)boolNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<bool[][]>(boolNestedCollection)), ((ValueComparer<bool>)((IProperty)boolToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToTwoValuesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToZeroOneConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytes)), (object)source.GetCurrentValue<byte[][]>(bytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)bytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(bytesArray)), (object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)bytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection)), source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytesToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty)), ((ValueComparer<int>)((IProperty)castingConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)((IProperty)@char).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(@char)), (IEnumerable<char>)source.GetCurrentValue<char[]>(charArray) == null ? null : (char[])((ValueComparer<IEnumerable<char>>)((IProperty)charArray).GetValueComparer()).Snapshot((IEnumerable<char>)source.GetCurrentValue<char[]>(charArray)), (object)source.GetCurrentValue<char[][]>(charNestedCollection) == null ? null : (char[][])((ValueComparer<object>)((IProperty)charNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<char[][]>(charNestedCollection)), ((ValueComparer<char>)((IProperty)charToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)((IProperty)dateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer<IEnumerable<DateOnly>>)((IProperty)dateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray)), ((ValueComparer<DateOnly>)((IProperty)dateOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)dateTimeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)((IProperty)@decimal).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray) == null ? null : (decimal[])((ValueComparer<IEnumerable<decimal>>)((IProperty)decimalArray).GetValueComparer()).Snapshot((IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray)), ((ValueComparer<decimal>)((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))); - var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)((IProperty)decimalNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)((IProperty)@double).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(@double)), (IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray) == null ? null : (double[])((ValueComparer<IEnumerable<double>>)((IProperty)doubleArray).GetValueComparer()).Snapshot((IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray)), ((ValueComparer<double>)((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)((IProperty)doubleNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection)), (object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection) == null ? null : (List<CompiledModelTestBase.Enum32>[][])((ValueComparer<object>)((IProperty)enum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))); - var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer<object>)((IProperty)enum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection)), (object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer<object>)((IProperty)enumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection)), ((ValueComparer<float>)((IProperty)@float).GetValueComparer()).Snapshot(source.GetCurrentValue<float>(@float)), (IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray) == null ? null : (float[])((ValueComparer<IEnumerable<float>>)((IProperty)floatArray).GetValueComparer()).Snapshot((IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray))); - var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, Nullable<int>, Nullable<bool>, Nullable<bool>[], byte[], byte[][], byte[][][], Nullable<char>, Nullable<char>[]>(((ValueComparer<Guid>)((IProperty)guid).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guid)), (IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray) == null ? null : (Guid[])((ValueComparer<IEnumerable<Guid>>)((IProperty)guidArray).GetValueComparer()).Snapshot((IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray)), (object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection) == null ? null : (ICollection<Guid[][]>)((ValueComparer<object>)((IProperty)guidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection)), ((ValueComparer<Guid>)((IProperty)guidToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)((IProperty)guidToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress)), (object)source.GetCurrentValue<IPAddress[]>(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)iPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(iPAddressArray)), source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty)), ((ValueComparer<short>)((IProperty)int16).GetValueComparer()).Snapshot(source.GetCurrentValue<short>(int16)), (IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array) == null ? null : (short[])((ValueComparer<IEnumerable<short>>)((IProperty)int16Array).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array)), ((ValueComparer<int>)((IProperty)int32).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(int32)), (IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array) == null ? null : (int[])((ValueComparer<IEnumerable<int>>)((IProperty)int32Array).GetValueComparer()).Snapshot((IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array)), (object)source.GetCurrentValue<int[][]>(int32NestedCollection) == null ? null : (int[][])((ValueComparer<object>)((IProperty)int32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<int[][]>(int32NestedCollection)), ((ValueComparer<long>)((IProperty)int64).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(int64)), (IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array) == null ? null : (long[])((ValueComparer<IEnumerable<long>>)((IProperty)int64Array).GetValueComparer()).Snapshot((IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array)), (object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection) == null ? null : (IList<long[]>[])((ValueComparer<object>)((IProperty)int64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection)), ((ValueComparer<sbyte>)((IProperty)int8).GetValueComparer()).Snapshot(source.GetCurrentValue<sbyte>(int8)), (IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array) == null ? null : (sbyte[])((ValueComparer<IEnumerable<sbyte>>)((IProperty)int8Array).GetValueComparer()).Snapshot((IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array)), (object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer<object>)((IProperty)int8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection)), ((ValueComparer<int>)((IProperty)intNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)((IProperty)intNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullIntToNullStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty)), source.GetCurrentValue<Nullable<bool>>(nullableBool) == null ? null : ((ValueComparer<Nullable<bool>>)((IProperty)nullableBool).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<bool>>(nullableBool)), (IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray) == null ? null : (Nullable<bool>[])((ValueComparer<IEnumerable<Nullable<bool>>>)((IProperty)nullableBoolArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray)), source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)nullableBytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes)), (object)source.GetCurrentValue<byte[][]>(nullableBytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)nullableBytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(nullableBytesArray)), (object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)nullableBytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection)), source.GetCurrentValue<Nullable<char>>(nullableChar) == null ? null : ((ValueComparer<Nullable<char>>)((IProperty)nullableChar).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<char>>(nullableChar)), (IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray) == null ? null : (Nullable<char>[])((ValueComparer<IEnumerable<Nullable<char>>>)((IProperty)nullableCharArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray))); - var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot<Nullable<DateOnly>, Nullable<DateOnly>[], Nullable<DateTime>, Nullable<DateTime>[], Nullable<decimal>, Nullable<decimal>[], Nullable<double>, Nullable<double>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], List<Nullable<CompiledModelTestBase.Enum16>>, List<Nullable<CompiledModelTestBase.Enum16>>, Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], List<Nullable<CompiledModelTestBase.Enum32>>, List<Nullable<CompiledModelTestBase.Enum32>>, Nullable<CompiledModelTestBase.Enum32>[][][], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], List<Nullable<CompiledModelTestBase.Enum64>>, List<Nullable<CompiledModelTestBase.Enum64>>, Nullable<CompiledModelTestBase.Enum8>, Nullable<CompiledModelTestBase.Enum8>[], Nullable<CompiledModelTestBase.Enum8>>(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly) == null ? null : ((ValueComparer<Nullable<DateOnly>>)((IProperty)nullableDateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly)), (IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray) == null ? null : (Nullable<DateOnly>[])((ValueComparer<IEnumerable<Nullable<DateOnly>>>)((IProperty)nullableDateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray)), source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime) == null ? null : ((ValueComparer<Nullable<DateTime>>)((IProperty)nullableDateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime)), (IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray) == null ? null : (Nullable<DateTime>[])((ValueComparer<IEnumerable<Nullable<DateTime>>>)((IProperty)nullableDateTimeArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray)), source.GetCurrentValue<Nullable<decimal>>(nullableDecimal) == null ? null : ((ValueComparer<Nullable<decimal>>)((IProperty)nullableDecimal).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<decimal>>(nullableDecimal)), (IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray) == null ? null : (Nullable<decimal>[])((ValueComparer<IEnumerable<Nullable<decimal>>>)((IProperty)nullableDecimalArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray)), source.GetCurrentValue<Nullable<double>>(nullableDouble) == null ? null : ((ValueComparer<Nullable<double>>)((IProperty)nullableDouble).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<double>>(nullableDouble)), (IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray) == null ? null : (Nullable<double>[])((ValueComparer<IEnumerable<Nullable<double>>>)((IProperty)nullableDoubleArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[][][])((ValueComparer<object>)((IProperty)nullableEnum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString))); - var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot<Nullable<CompiledModelTestBase.Enum8>[], List<Nullable<CompiledModelTestBase.Enum8>>, List<Nullable<CompiledModelTestBase.Enum8>>, Nullable<CompiledModelTestBase.Enum8>[][], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], List<Nullable<CompiledModelTestBase.EnumU16>>, List<Nullable<CompiledModelTestBase.EnumU16>>, Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], List<Nullable<CompiledModelTestBase.EnumU32>>, List<Nullable<CompiledModelTestBase.EnumU32>>, Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], List<Nullable<CompiledModelTestBase.EnumU64>>, List<Nullable<CompiledModelTestBase.EnumU64>>, Nullable<CompiledModelTestBase.EnumU64>[][], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], List<Nullable<CompiledModelTestBase.EnumU8>>, List<Nullable<CompiledModelTestBase.EnumU8>>, Nullable<float>>((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[][])((ValueComparer<object>)((IProperty)nullableEnum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[][])((ValueComparer<object>)((IProperty)nullableEnumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection)), source.GetCurrentValue<Nullable<float>>(nullableFloat) == null ? null : ((ValueComparer<Nullable<float>>)((IProperty)nullableFloat).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<float>>(nullableFloat))); - var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot<Nullable<float>[], Nullable<Guid>, Nullable<Guid>[], Nullable<Guid>[][], IPAddress, IPAddress[], Nullable<short>, Nullable<short>[], Nullable<int>, Nullable<int>[], Nullable<int>[][], Nullable<long>, Nullable<long>[], List<Nullable<long>[][]>, Nullable<sbyte>, Nullable<sbyte>[], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], Nullable<TimeOnly>, Nullable<TimeOnly>[], Nullable<TimeSpan>, Nullable<TimeSpan>[], Nullable<ushort>, Nullable<ushort>[], Nullable<uint>, Nullable<uint>[]>((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray) == null ? null : (Nullable<float>[])((ValueComparer<IEnumerable<Nullable<float>>>)((IProperty)nullableFloatArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray)), source.GetCurrentValue<Nullable<Guid>>(nullableGuid) == null ? null : ((ValueComparer<Nullable<Guid>>)((IProperty)nullableGuid).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<Guid>>(nullableGuid)), (IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray) == null ? null : (Nullable<Guid>[])((ValueComparer<IEnumerable<Nullable<Guid>>>)((IProperty)nullableGuidArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray)), (object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection) == null ? null : (Nullable<Guid>[][])((ValueComparer<object>)((IProperty)nullableGuidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection)), source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)nullableIPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress)), (object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)nullableIPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray)), source.GetCurrentValue<Nullable<short>>(nullableInt16) == null ? null : ((ValueComparer<Nullable<short>>)((IProperty)nullableInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<short>>(nullableInt16)), (IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array) == null ? null : (Nullable<short>[])((ValueComparer<IEnumerable<Nullable<short>>>)((IProperty)nullableInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array)), source.GetCurrentValue<Nullable<int>>(nullableInt32) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullableInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullableInt32)), (IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array) == null ? null : (Nullable<int>[])((ValueComparer<IEnumerable<Nullable<int>>>)((IProperty)nullableInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array)), (object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection) == null ? null : (Nullable<int>[][])((ValueComparer<object>)((IProperty)nullableInt32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection)), source.GetCurrentValue<Nullable<long>>(nullableInt64) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)nullableInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(nullableInt64)), (IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array) == null ? null : (Nullable<long>[])((ValueComparer<IEnumerable<Nullable<long>>>)((IProperty)nullableInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array)), (object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection) == null ? null : (List<Nullable<long>[][]>)((ValueComparer<object>)((IProperty)nullableInt64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue<Nullable<sbyte>>(nullableInt8) == null ? null : ((ValueComparer<Nullable<sbyte>>)((IProperty)nullableInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<sbyte>>(nullableInt8)), (IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array) == null ? null : (Nullable<sbyte>[])((ValueComparer<IEnumerable<Nullable<sbyte>>>)((IProperty)nullableInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array)), source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)nullablePhysicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)nullablePhysicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray)), (object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable<PhysicalAddress[][]>)((ValueComparer<object>)((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)((IProperty)nullableString).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(nullableString)), (object)source.GetCurrentValue<string[]>(nullableStringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)nullableStringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(nullableStringArray)), (object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)nullableStringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection)), source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly) == null ? null : ((ValueComparer<Nullable<TimeOnly>>)((IProperty)nullableTimeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly)), (IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray) == null ? null : (Nullable<TimeOnly>[])((ValueComparer<IEnumerable<Nullable<TimeOnly>>>)((IProperty)nullableTimeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray)), source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan) == null ? null : ((ValueComparer<Nullable<TimeSpan>>)((IProperty)nullableTimeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan)), (IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray) == null ? null : (Nullable<TimeSpan>[])((ValueComparer<IEnumerable<Nullable<TimeSpan>>>)((IProperty)nullableTimeSpanArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray)), source.GetCurrentValue<Nullable<ushort>>(nullableUInt16) == null ? null : ((ValueComparer<Nullable<ushort>>)((IProperty)nullableUInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ushort>>(nullableUInt16)), (IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array) == null ? null : (Nullable<ushort>[])((ValueComparer<IEnumerable<Nullable<ushort>>>)((IProperty)nullableUInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array)), source.GetCurrentValue<Nullable<uint>>(nullableUInt32) == null ? null : ((ValueComparer<Nullable<uint>>)((IProperty)nullableUInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<uint>>(nullableUInt32)), (IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array) == null ? null : (Nullable<uint>[])((ValueComparer<IEnumerable<Nullable<uint>>>)((IProperty)nullableUInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array))); - var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg6 = (ISnapshot)new Snapshot<Nullable<ulong>, Nullable<ulong>[], Nullable<byte>, Nullable<byte>[], Nullable<byte>[][], 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<Nullable<ulong>>(nullableUInt64) == null ? null : ((ValueComparer<Nullable<ulong>>)((IProperty)nullableUInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ulong>>(nullableUInt64)), (IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array) == null ? null : (Nullable<ulong>[])((ValueComparer<IEnumerable<Nullable<ulong>>>)((IProperty)nullableUInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array)), source.GetCurrentValue<Nullable<byte>>(nullableUInt8) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)nullableUInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(nullableUInt8)), (IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array) == null ? null : (Nullable<byte>[])((ValueComparer<IEnumerable<Nullable<byte>>>)((IProperty)nullableUInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array)), (object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable<byte>[][])((ValueComparer<object>)((IProperty)nullableUInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)((IProperty)nullableUri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(nullableUri)), (object)source.GetCurrentValue<Uri[]>(nullableUriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)nullableUriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(nullableUriArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)physicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty)), source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)((IProperty)@string).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(@string)), (object)source.GetCurrentValue<string[]>(stringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)stringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(stringArray)), (object)source.GetCurrentValue<string[][]>(stringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)stringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(stringNestedCollection)), source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBoolConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty)), source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty)), source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToCharConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty)), source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty)), source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty)), source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToEnumConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty)), source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToGuidConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty)), source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToIntNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty)), source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty)), source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeSpanConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty)), source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToUriConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer<IEnumerable<TimeOnly>>)((IProperty)timeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))); - var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)((IProperty)timeOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer<IEnumerable<TimeSpan>>)((IProperty)timeSpanArray).GetValueComparer()).Snapshot((IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)((IProperty)uInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array) == null ? null : (ushort[])((ValueComparer<IEnumerable<ushort>>)((IProperty)uInt16Array).GetValueComparer()).Snapshot((IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array)), ((ValueComparer<uint>)((IProperty)uInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<uint>(uInt32)), (IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array) == null ? null : (uint[])((ValueComparer<IEnumerable<uint>>)((IProperty)uInt32Array).GetValueComparer()).Snapshot((IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array)), ((ValueComparer<ulong>)((IProperty)uInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array) == null ? null : (ulong[])((ValueComparer<IEnumerable<ulong>>)((IProperty)uInt64Array).GetValueComparer()).Snapshot((IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array)), ((ValueComparer<byte>)((IProperty)uInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<byte>(uInt8)), source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)((IProperty)uInt8Array).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array)), (object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection) == null ? null : (List<byte[]>)((ValueComparer<object>)((IProperty)uInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection)), source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)((IProperty)uri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uri)), (object)source.GetCurrentValue<Uri[]>(uriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)uriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(uriArray)), source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)((IProperty)uriToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty))) }); + var entity = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)(((IProperty)@bool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(@bool)), (((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))) == null ? null : ((bool[])(((ValueComparer<IEnumerable<bool>>)(((IProperty)boolArray).GetValueComparer())).Snapshot(((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))))))), (((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))) == null ? null : ((bool[][])(((ValueComparer<object>)(((IProperty)boolNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))))))), ((ValueComparer<bool>)(((IProperty)boolToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToTwoValuesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToZeroOneConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), (source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytes))), (((object)(source.GetCurrentValue<byte[][]>(bytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)bytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(bytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)bytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))))))), (source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytesToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty))), ((ValueComparer<int>)(((IProperty)castingConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)(((IProperty)@char).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(@char)), (((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))) == null ? null : ((char[])(((ValueComparer<IEnumerable<char>>)(((IProperty)charArray).GetValueComparer())).Snapshot(((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))))))), (((object)(source.GetCurrentValue<char[][]>(charNestedCollection))) == null ? null : ((char[][])(((ValueComparer<object>)(((IProperty)charNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<char[][]>(charNestedCollection))))))), ((ValueComparer<char>)(((IProperty)charToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)(((IProperty)dateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))) == null ? null : ((DateOnly[])(((ValueComparer<IEnumerable<DateOnly>>)(((IProperty)dateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))))))), ((ValueComparer<DateOnly>)(((IProperty)dateOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)dateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))))))), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)(((IProperty)@decimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))) == null ? null : ((decimal[])(((ValueComparer<IEnumerable<decimal>>)(((IProperty)decimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))))))), ((ValueComparer<decimal>)(((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))))); + var entity0 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)(((IProperty)decimalNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)(((IProperty)@double).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(@double)), (((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))) == null ? null : ((double[])(((ValueComparer<IEnumerable<double>>)(((IProperty)doubleArray).GetValueComparer())).Snapshot(((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))))))), ((ValueComparer<double>)(((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)(((IProperty)doubleNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))))))), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))))))), (((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>[][])(((ValueComparer<object>)(((IProperty)enum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection)))))))))); + var entity1 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg1 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8[][])(((ValueComparer<object>)(((IProperty)enum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64[][])(((ValueComparer<object>)(((IProperty)enumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))))))), ((ValueComparer<float>)(((IProperty)@float).GetValueComparer())).Snapshot(source.GetCurrentValue<float>(@float)), (((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray))) == null ? null : ((float[])(((ValueComparer<IEnumerable<float>>)(((IProperty)floatArray).GetValueComparer())).Snapshot(((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray)))))))))); + var entity2 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg2 = ((ISnapshot)(new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, int?, bool?, bool? [], byte[], byte[][], byte[][][], char?, char? []>(((ValueComparer<Guid>)(((IProperty)guid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guid)), (((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))) == null ? null : ((Guid[])(((ValueComparer<IEnumerable<Guid>>)(((IProperty)guidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))))))), (((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))) == null ? null : ((ICollection<Guid[][]>)(((ValueComparer<object>)(((IProperty)guidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))))))), ((ValueComparer<Guid>)(((IProperty)guidToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)(((IProperty)guidToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), (source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)iPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))))))), (source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty))), (source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty))), ((ValueComparer<short>)(((IProperty)int16).GetValueComparer())).Snapshot(source.GetCurrentValue<short>(int16)), (((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))) == null ? null : ((short[])(((ValueComparer<IEnumerable<short>>)(((IProperty)int16Array).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))))))), ((ValueComparer<int>)(((IProperty)int32).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(int32)), (((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))) == null ? null : ((int[])(((ValueComparer<IEnumerable<int>>)(((IProperty)int32Array).GetValueComparer())).Snapshot(((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))))))), (((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))) == null ? null : ((int[][])(((ValueComparer<object>)(((IProperty)int32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))))))), ((ValueComparer<long>)(((IProperty)int64).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(int64)), (((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))) == null ? null : ((long[])(((ValueComparer<IEnumerable<long>>)(((IProperty)int64Array).GetValueComparer())).Snapshot(((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))))))), (((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))) == null ? null : ((IList<long[]>[])(((ValueComparer<object>)(((IProperty)int64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))))))), ((ValueComparer<sbyte>)(((IProperty)int8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte>(int8)), (((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))) == null ? null : ((sbyte[])(((ValueComparer<IEnumerable<sbyte>>)(((IProperty)int8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))))))), (((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))) == null ? null : ((sbyte[][][])(((ValueComparer<object>)(((IProperty)int8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))))))), ((ValueComparer<int>)(((IProperty)intNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)(((IProperty)intNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), (source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<int?>)(((IProperty)nullIntToNullStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty))), (source.GetCurrentValue<bool?>(nullableBool) == null ? null : ((ValueComparer<bool?>)(((IProperty)nullableBool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool?>(nullableBool))), (((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))) == null ? null : ((bool? [])(((ValueComparer<IEnumerable<bool?>>)(((IProperty)nullableBoolArray).GetValueComparer())).Snapshot(((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))))))), (source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)nullableBytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes))), (((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)nullableBytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)nullableBytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))))))), (source.GetCurrentValue<char?>(nullableChar) == null ? null : ((ValueComparer<char?>)(((IProperty)nullableChar).GetValueComparer())).Snapshot(source.GetCurrentValue<char?>(nullableChar))), (((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray))) == null ? null : ((char? [])(((ValueComparer<IEnumerable<char?>>)(((IProperty)nullableCharArray).GetValueComparer())).Snapshot(((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray)))))))))); + var entity3 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg3 = ((ISnapshot)(new Snapshot<DateOnly?, DateOnly? [], DateTime?, DateTime? [], decimal?, decimal? [], double?, double? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], List<CompiledModelTestBase.Enum16?>, List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], List<CompiledModelTestBase.Enum32?>, List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32? [][][], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], List<CompiledModelTestBase.Enum64?>, List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum8?, CompiledModelTestBase.Enum8? [], CompiledModelTestBase.Enum8?>((source.GetCurrentValue<DateOnly?>(nullableDateOnly) == null ? null : ((ValueComparer<DateOnly?>)(((IProperty)nullableDateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly?>(nullableDateOnly))), (((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))) == null ? null : ((DateOnly? [])(((ValueComparer<IEnumerable<DateOnly?>>)(((IProperty)nullableDateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))))))), (source.GetCurrentValue<DateTime?>(nullableDateTime) == null ? null : ((ValueComparer<DateTime?>)(((IProperty)nullableDateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime?>(nullableDateTime))), (((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))) == null ? null : ((DateTime? [])(((ValueComparer<IEnumerable<DateTime?>>)(((IProperty)nullableDateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))))))), (source.GetCurrentValue<decimal?>(nullableDecimal) == null ? null : ((ValueComparer<decimal?>)(((IProperty)nullableDecimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal?>(nullableDecimal))), (((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))) == null ? null : ((decimal? [])(((ValueComparer<IEnumerable<decimal?>>)(((IProperty)nullableDecimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))))))), (source.GetCurrentValue<double?>(nullableDouble) == null ? null : ((ValueComparer<double?>)(((IProperty)nullableDouble).GetValueComparer())).Snapshot(source.GetCurrentValue<double?>(nullableDouble))), (((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))) == null ? null : ((double? [])(((ValueComparer<IEnumerable<double?>>)(((IProperty)nullableDoubleArray).GetValueComparer())).Snapshot(((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum32? [][][])(((ValueComparer<object>)(((IProperty)nullableEnum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString)))))); + var entity4 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg4 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8? [], List<CompiledModelTestBase.Enum8?>, List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8? [][], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], List<CompiledModelTestBase.EnumU16?>, List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], List<CompiledModelTestBase.EnumU32?>, List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], List<CompiledModelTestBase.EnumU64?>, List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64? [][], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], List<CompiledModelTestBase.EnumU8?>, List<CompiledModelTestBase.EnumU8?>, float?>((((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8? [][])(((ValueComparer<object>)(((IProperty)nullableEnum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64? [][])(((ValueComparer<object>)(((IProperty)nullableEnumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))))))), (source.GetCurrentValue<float?>(nullableFloat) == null ? null : ((ValueComparer<float?>)(((IProperty)nullableFloat).GetValueComparer())).Snapshot(source.GetCurrentValue<float?>(nullableFloat)))))); + var entity5 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg5 = ((ISnapshot)(new Snapshot<float? [], Guid?, Guid? [], Guid? [][], IPAddress, IPAddress[], short?, short? [], int?, int? [], int? [][], long?, long? [], List<long? [][]>, sbyte?, sbyte? [], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], TimeOnly?, TimeOnly? [], TimeSpan?, TimeSpan? [], ushort?, ushort? [], uint?, uint? []>((((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))) == null ? null : ((float? [])(((ValueComparer<IEnumerable<float?>>)(((IProperty)nullableFloatArray).GetValueComparer())).Snapshot(((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))))))), (source.GetCurrentValue<Guid?>(nullableGuid) == null ? null : ((ValueComparer<Guid?>)(((IProperty)nullableGuid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid?>(nullableGuid))), (((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))) == null ? null : ((Guid? [])(((ValueComparer<IEnumerable<Guid?>>)(((IProperty)nullableGuidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))))))), (((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))) == null ? null : ((Guid? [][])(((ValueComparer<object>)(((IProperty)nullableGuidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))))))), (source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)nullableIPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)nullableIPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))))))), (source.GetCurrentValue<short?>(nullableInt16) == null ? null : ((ValueComparer<short?>)(((IProperty)nullableInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<short?>(nullableInt16))), (((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))) == null ? null : ((short? [])(((ValueComparer<IEnumerable<short?>>)(((IProperty)nullableInt16Array).GetValueComparer())).Snapshot(((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))))))), (source.GetCurrentValue<int?>(nullableInt32) == null ? null : ((ValueComparer<int?>)(((IProperty)nullableInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullableInt32))), (((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))) == null ? null : ((int? [])(((ValueComparer<IEnumerable<int?>>)(((IProperty)nullableInt32Array).GetValueComparer())).Snapshot(((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))))))), (((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))) == null ? null : ((int? [][])(((ValueComparer<object>)(((IProperty)nullableInt32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))))))), (source.GetCurrentValue<long?>(nullableInt64) == null ? null : ((ValueComparer<long?>)(((IProperty)nullableInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(nullableInt64))), (((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))) == null ? null : ((long? [])(((ValueComparer<IEnumerable<long?>>)(((IProperty)nullableInt64Array).GetValueComparer())).Snapshot(((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))))))), (((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))) == null ? null : ((List<long? [][]>)(((ValueComparer<object>)(((IProperty)nullableInt64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))))))), (source.GetCurrentValue<sbyte?>(nullableInt8) == null ? null : ((ValueComparer<sbyte?>)(((IProperty)nullableInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte?>(nullableInt8))), (((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))) == null ? null : ((sbyte? [])(((ValueComparer<IEnumerable<sbyte?>>)(((IProperty)nullableInt8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))))))), (source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)nullablePhysicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))))))), (((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))) == null ? null : ((IEnumerable<PhysicalAddress[][]>)(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))))))), (source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)(((IProperty)nullableString).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(nullableString))), (((object)(source.GetCurrentValue<string[]>(nullableStringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)nullableStringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(nullableStringArray))))))), (((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)nullableStringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))))))), (source.GetCurrentValue<TimeOnly?>(nullableTimeOnly) == null ? null : ((ValueComparer<TimeOnly?>)(((IProperty)nullableTimeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly?>(nullableTimeOnly))), (((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))) == null ? null : ((TimeOnly? [])(((ValueComparer<IEnumerable<TimeOnly?>>)(((IProperty)nullableTimeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))))))), (source.GetCurrentValue<TimeSpan?>(nullableTimeSpan) == null ? null : ((ValueComparer<TimeSpan?>)(((IProperty)nullableTimeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan?>(nullableTimeSpan))), (((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))) == null ? null : ((TimeSpan? [])(((ValueComparer<IEnumerable<TimeSpan?>>)(((IProperty)nullableTimeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))))))), (source.GetCurrentValue<ushort?>(nullableUInt16) == null ? null : ((ValueComparer<ushort?>)(((IProperty)nullableUInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort?>(nullableUInt16))), (((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))) == null ? null : ((ushort? [])(((ValueComparer<IEnumerable<ushort?>>)(((IProperty)nullableUInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))))))), (source.GetCurrentValue<uint?>(nullableUInt32) == null ? null : ((ValueComparer<uint?>)(((IProperty)nullableUInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint?>(nullableUInt32))), (((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array))) == null ? null : ((uint? [])(((ValueComparer<IEnumerable<uint?>>)(((IProperty)nullableUInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array)))))))))); + var entity6 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg6 = ((ISnapshot)(new Snapshot<ulong?, ulong? [], byte?, byte? [], byte? [][], 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<ulong?>(nullableUInt64) == null ? null : ((ValueComparer<ulong?>)(((IProperty)nullableUInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong?>(nullableUInt64))), (((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))) == null ? null : ((ulong? [])(((ValueComparer<IEnumerable<ulong?>>)(((IProperty)nullableUInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))))))), (source.GetCurrentValue<byte?>(nullableUInt8) == null ? null : ((ValueComparer<byte?>)(((IProperty)nullableUInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(nullableUInt8))), (((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))) == null ? null : ((byte? [])(((ValueComparer<IEnumerable<byte?>>)(((IProperty)nullableUInt8Array).GetValueComparer())).Snapshot(((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))))))), (((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))) == null ? null : ((byte? [][])(((ValueComparer<object>)(((IProperty)nullableUInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)(((IProperty)nullableUri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(nullableUri))), (((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)nullableUriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)physicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty))), (source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)(((IProperty)@string).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(@string))), (((object)(source.GetCurrentValue<string[]>(stringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)stringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(stringArray))))))), (((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)stringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))))))), (source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBoolConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty))), (source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty))), (source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToCharConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty))), (source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty))), (source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty))), (source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty))), (source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToEnumConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty))), (source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToGuidConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty))), (source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToIntNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty))), (source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeSpanConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty))), (source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToUriConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty))), ((ValueComparer<TimeOnly>)(((IProperty)timeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))) == null ? null : ((TimeOnly[])(((ValueComparer<IEnumerable<TimeOnly>>)(((IProperty)timeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray)))))))))); + var entity7 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, ((ISnapshot)(new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))) == null ? null : ((TimeSpan[])(((ValueComparer<IEnumerable<TimeSpan>>)(((IProperty)timeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))))))), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)(((IProperty)uInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))) == null ? null : ((ushort[])(((ValueComparer<IEnumerable<ushort>>)(((IProperty)uInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))))))), ((ValueComparer<uint>)(((IProperty)uInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint>(uInt32)), (((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))) == null ? null : ((uint[])(((ValueComparer<IEnumerable<uint>>)(((IProperty)uInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))))))), ((ValueComparer<ulong>)(((IProperty)uInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))) == null ? null : ((ulong[])(((ValueComparer<IEnumerable<ulong>>)(((IProperty)uInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))))))), ((ValueComparer<byte>)(((IProperty)uInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte>(uInt8)), (source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)(((IProperty)uInt8Array).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array))), (((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))) == null ? null : ((List<byte[]>)(((ValueComparer<object>)(((IProperty)uInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)(((IProperty)uri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uri))), (((object)(source.GetCurrentValue<Uri[]>(uriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)uriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(uriArray))))))), (source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)(((IProperty)uriToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty)))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(default(CompiledModelTestBase.ManyTypesId)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))); + var entity8 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 258, @@ -15862,779 +15603,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref CompiledModelTestBase.ManyTypesId UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] - public static extern ref bool[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] - public static extern ref bool[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] - public static extern ref char[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] - public static extern ref char[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] - public static extern ref DateOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] - public static extern ref decimal[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] - public static extern ref double[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32>[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] - public static extern ref float UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] - public static extern ref float[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] - public static extern ref Guid[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] - public static extern ref ICollection<Guid[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] - public static extern ref short UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] - public static extern ref short[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] - public static extern ref int[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] - public static extern ref int[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] - public static extern ref long[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] - public static extern ref IList<long[]>[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] - public static extern ref sbyte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] - public static extern ref sbyte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] - public static extern ref sbyte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] - public static extern ref bool? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] - public static extern ref bool?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] - public static extern ref char? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] - public static extern ref char?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] - public static extern ref DateOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] - public static extern ref DateOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] - public static extern ref DateTime? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] - public static extern ref DateTime?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] - public static extern ref decimal? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] - public static extern ref decimal?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] - public static extern ref double? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] - public static extern ref double?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] - public static extern ref float? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] - public static extern ref float?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] - public static extern ref Guid? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] - public static extern ref Guid?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] - public static extern ref Guid?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] - public static extern ref short? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] - public static extern ref short?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] - public static extern ref int?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] - public static extern ref int?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] - public static extern ref long?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] - public static extern ref List<long?[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] - public static extern ref sbyte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] - public static extern ref sbyte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] - public static extern ref IEnumerable<PhysicalAddress[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] - public static extern ref TimeOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] - public static extern ref TimeSpan? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] - public static extern ref TimeSpan?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] - public static extern ref ushort? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] - public static extern ref ushort?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] - public static extern ref uint? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] - public static extern ref uint?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] - public static extern ref ulong? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] - public static extern ref ulong?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] - public static extern ref byte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] - public static extern ref byte?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] - public static extern ref TimeSpan[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] - public static extern ref ushort UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] - public static extern ref ushort[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] - public static extern ref uint UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] - public static extern ref uint[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] - public static extern ref ulong UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] - public static extern ref ulong[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] - public static extern ref byte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] - public static extern ref List<byte[]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs new file mode 100644 index 00000000000..a7f933eb3fd --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesUnsafeAccessors.cs @@ -0,0 +1,790 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class ManyTypesUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref CompiledModelTestBase.ManyTypesId Id(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] + public static extern ref bool Bool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] + public static extern ref bool[] BoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] + public static extern ref bool[][] BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] + public static extern ref bool BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] + public static extern ref bool BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] + public static extern ref bool BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] + public static extern ref byte[] Bytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] + public static extern ref byte[][] BytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] + public static extern ref byte[] BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] + public static extern ref int CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] + public static extern ref char Char(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] + public static extern ref char[] CharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] + public static extern ref char[][] CharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] + public static extern ref char CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] + public static extern ref DateOnly DateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] + public static extern ref DateOnly[] DateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] + public static extern ref DateOnly DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] + public static extern ref DateTime DateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] + public static extern ref DateTime[] DateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] + public static extern ref decimal Decimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] + public static extern ref decimal[] DecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] + public static extern ref double Double(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] + public static extern ref double[] DoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32>[][] Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[][] Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[][] EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] + public static extern ref float Float(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] + public static extern ref float[] FloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] + public static extern ref Guid Guid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] + public static extern ref Guid[] GuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] + public static extern ref ICollection<Guid[][]> GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] + public static extern ref Guid GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] + public static extern ref Guid GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] + public static extern ref IPAddress IPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] + public static extern ref IPAddress[] IPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] + public static extern ref short Int16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] + public static extern ref short[] Int16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] + public static extern ref int Int32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] + public static extern ref int[] Int32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] + public static extern ref int[][] Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] + public static extern ref long Int64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] + public static extern ref long[] Int64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] + public static extern ref IList<long[]>[] Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] + public static extern ref sbyte Int8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] + public static extern ref sbyte[] Int8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] + public static extern ref sbyte[][][] Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] + public static extern ref int IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] + public static extern ref int IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] + public static extern ref int? NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] + public static extern ref bool? NullableBool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] + public static extern ref bool?[] NullableBoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] + public static extern ref byte[] NullableBytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] + public static extern ref byte[][] NullableBytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] + public static extern ref char? NullableChar(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] + public static extern ref char?[] NullableCharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] + public static extern ref DateOnly? NullableDateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] + public static extern ref DateOnly?[] NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] + public static extern ref DateTime? NullableDateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] + public static extern ref DateTime?[] NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] + public static extern ref decimal? NullableDecimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] + public static extern ref decimal?[] NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] + public static extern ref double? NullableDouble(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] + public static extern ref double?[] NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[][][] NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[][] NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[][] NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] + public static extern ref float? NullableFloat(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] + public static extern ref float?[] NullableFloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] + public static extern ref Guid? NullableGuid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] + public static extern ref Guid?[] NullableGuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] + public static extern ref Guid?[][] NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] + public static extern ref IPAddress NullableIPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] + public static extern ref IPAddress[] NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] + public static extern ref short? NullableInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] + public static extern ref short?[] NullableInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] + public static extern ref int? NullableInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] + public static extern ref int?[] NullableInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] + public static extern ref int?[][] NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] + public static extern ref long? NullableInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] + public static extern ref long?[] NullableInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] + public static extern ref List<long?[][]> NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] + public static extern ref sbyte? NullableInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] + public static extern ref sbyte?[] NullableInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] + public static extern ref IEnumerable<PhysicalAddress[][]> NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] + public static extern ref string NullableString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] + public static extern ref string[] NullableStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] + public static extern ref string[][] NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] + public static extern ref TimeOnly? NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly?[] NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] + public static extern ref TimeSpan? NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] + public static extern ref TimeSpan?[] NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] + public static extern ref ushort? NullableUInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] + public static extern ref ushort?[] NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] + public static extern ref uint? NullableUInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] + public static extern ref uint?[] NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] + public static extern ref ulong? NullableUInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] + public static extern ref ulong?[] NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] + public static extern ref byte? NullableUInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] + public static extern ref byte?[] NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] + public static extern ref byte?[][] NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] + public static extern ref Uri NullableUri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] + public static extern ref Uri[] NullableUriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] + public static extern ref string String(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] + public static extern ref string[] StringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] + public static extern ref string[][] StringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] + public static extern ref string StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] + public static extern ref string StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] + public static extern ref string StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] + public static extern ref string StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] + public static extern ref string StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] + public static extern ref string StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] + public static extern ref string StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] + public static extern ref string StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] + public static extern ref TimeOnly TimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly[] TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] + public static extern ref TimeSpan TimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] + public static extern ref TimeSpan[] TimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] + public static extern ref ushort UInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] + public static extern ref ushort[] UInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] + public static extern ref uint UInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] + public static extern ref uint[] UInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] + public static extern ref ulong UInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] + public static extern ref ulong[] UInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] + public static extern ref byte UInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] + public static extern ref byte[] UInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] + public static extern ref List<byte[]> UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] + public static extern ref Uri Uri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] + public static extern ref Uri[] UriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] + public static extern ref Uri UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs index f7988939e9b..df517720b0e 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -43,11 +42,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalDerivedId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalDerivedId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -56,17 +55,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalDerivedId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalDerivedId)); @@ -77,11 +76,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalDerivedAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalDerivedAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -98,11 +97,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); id.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -111,17 +110,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -133,20 +132,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[3]); details.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -154,7 +153,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); details.TypeMapping = SqliteStringTypeMapping.Default; - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -163,20 +161,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<Number>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[4]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[4]); number.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -185,20 +183,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -207,20 +204,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeArray.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -229,53 +226,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -284,20 +280,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeEnumerable.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -306,23 +302,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -331,20 +326,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeIList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -353,23 +348,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -378,20 +372,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -400,53 +394,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -455,20 +448,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[9]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeArray.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -477,23 +470,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -502,20 +494,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeEnumerable.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -524,37 +516,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -563,20 +554,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeIList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -585,37 +576,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -624,20 +614,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -646,37 +636,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -713,19 +702,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); manyOwned.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance) == null); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) == null, + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance) == null); manyOwned.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), null); manyOwned.SetPropertyIndexes( index: 3, @@ -734,11 +723,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 5, storeGenerationIndex: -1); manyOwned.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), - () => (ICollection<CompiledModelTestBase.OwnedType>)(ICollection<CompiledModelTestBase.OwnedType>)new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), + ICollection<CompiledModelTestBase.OwnedType> () => ((ICollection<CompiledModelTestBase.OwnedType>)(((ICollection<CompiledModelTestBase.OwnedType>)(new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -761,24 +750,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, int>(source.ContainsKey("PrincipalDerivedId") ? (long)source["PrincipalDerivedId"] : 0L, source.ContainsKey("PrincipalDerivedAlternateId") ? (Guid)source["PrincipalDerivedAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, int>((source.ContainsKey("PrincipalDerivedId") ? ((long)(source["PrincipalDerivedId"])) : 0L), (source.ContainsKey("PrincipalDerivedAlternateId") ? ((Guid)(source["PrincipalDerivedAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 13, @@ -799,35 +788,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs index 7f3848c7b6a..3155dcc5aa8 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalBaseId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalBaseId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalBaseId)); @@ -90,11 +89,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalBaseAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalBaseAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -112,20 +111,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[2]); details.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -143,7 +142,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas overrides0.Add(StoreObjectIdentifier.Table("Details", null), detailsDetails); details.AddAnnotation("Relational:RelationalOverrides", overrides0); - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -153,20 +151,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[3]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[3]); number.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -175,20 +173,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -198,20 +195,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[4]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[4]); refTypeArray.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -220,53 +217,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -276,20 +272,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeEnumerable.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -298,23 +294,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -324,20 +319,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeIList.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -346,23 +341,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -372,20 +366,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -394,53 +388,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -450,20 +443,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); valueTypeArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -472,23 +465,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -498,20 +490,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeEnumerable.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -520,37 +512,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -560,20 +551,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeIList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -582,37 +573,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -622,20 +612,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -644,37 +634,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -715,19 +704,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); owned.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); owned.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetAccessors( - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), null); owned.SetPropertyIndexes( index: 0, @@ -735,7 +724,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - owned.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return runtimeForeignKey; } @@ -770,24 +758,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid>(source.ContainsKey("PrincipalBaseId") ? (long)source["PrincipalBaseId"] : 0L, source.ContainsKey("PrincipalBaseAlternateId") ? (Guid)source["PrincipalBaseAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"))); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid>((source.ContainsKey("PrincipalBaseId") ? ((long)(source["PrincipalBaseId"])) : 0L), (source.ContainsKey("PrincipalBaseAlternateId") ? ((Guid)(source["PrincipalBaseAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 12, @@ -815,35 +803,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..ed8d21e397c --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,45 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable<string> _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList<string> _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List<IPAddress> _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable<byte> _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List<short> _valueTypeList(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs index 9f805b594c0..f3e7aacd466 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -47,20 +46,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<Nullable<long>>(0) : entry.FlaggedAsTemporary(0) && !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity).HasValue ? entry.ReadTemporaryValue<Nullable<long>>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long?>(0) : (entry.FlaggedAsTemporary(0) && !(PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))).HasValue) ? entry.ReadTemporaryValue<long?>(0) : PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -69,17 +68,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); @@ -95,7 +94,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas overrides.Add(StoreObjectIdentifier.Table("PrincipalDerived", null), idPrincipalDerived); id.AddAnnotation("Relational:RelationalOverrides", overrides); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var alternateId = runtimeEntityType.AddProperty( "AlternateId", @@ -106,20 +104,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas sentinel: new Guid("00000000-0000-0000-0000-000000000000"), jsonValueReaderWriter: JsonGuidReaderWriter.Instance); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, + bool (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId)), + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); alternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -135,20 +133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 2), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enum1.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -157,29 +155,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -188,20 +185,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 3), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum2.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -210,30 +207,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -241,20 +237,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 4), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[4]); flagsEnum1.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -263,29 +259,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -294,20 +289,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), propertyAccessMode: PropertyAccessMode.Property); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum2.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -316,29 +311,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(6); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2", "TestNamespace"), ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2", "TestNamespace") }); var point = runtimeEntityType.AddProperty( "Point", @@ -349,11 +343,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueComparer: new CompiledModelTestBase.CustomValueComparer<Point>(), providerValueComparer: new CompiledModelTestBase.CustomValueComparer<Point>()); point.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<Point>(2) : entry.FlaggedAsTemporary(6) && entry.ReadShadowValue<Point>(0) == null ? entry.ReadTemporaryValue<Point>(2) : entry.ReadShadowValue<Point>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), - (ValueBuffer valueBuffer) => valueBuffer[6]); + Point (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(6) ? entry.ReadStoreGeneratedValue<Point>(2) : (entry.FlaggedAsTemporary(6) && entry.ReadShadowValue<Point>(0) == null ? entry.ReadTemporaryValue<Point>(2) : entry.ReadShadowValue<Point>(0))), + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(0), + Point (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 6), + Point (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), + object (ValueBuffer valueBuffer) => valueBuffer[6]); point.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -371,20 +365,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 7), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeArray.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -393,53 +387,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -448,20 +441,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 8), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeEnumerable.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -470,23 +463,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -495,20 +487,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 9), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeIList.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -517,23 +509,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -542,20 +533,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 10), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -564,53 +555,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -619,20 +609,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 11), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeArray.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -641,23 +631,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -666,20 +655,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[12]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 12), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeEnumerable.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -688,37 +677,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -727,20 +715,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 13), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeIList.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -749,37 +737,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -788,20 +775,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 14), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -810,37 +797,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -879,19 +865,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 1, @@ -900,12 +886,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 3, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -934,24 +919,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key0)); var owned = runtimeEntityType.FindNavigation("Owned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Guid, Point>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(default(Guid)), default(Point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(default(Point)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, Guid, Point>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(default(Guid)), (default(Point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(default(Point))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Guid, Point>(default(Nullable<long>), default(Guid), default(Point))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, Guid, Point>(default(long? ), default(Guid), default(Point))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Point>(source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<Point>((source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Point>(default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<Point>(default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -973,53 +958,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] - public static extern CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] - public static extern void UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs index c04d9f0141a..1a587c051d0 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs @@ -41,16 +41,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); derivedsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -59,26 +59,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null) == null) { return entry.ReadTemporaryValue<long>(0); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); derivedsId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -87,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); derivedsId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); derivedsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(derivedsId)); @@ -108,16 +108,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); derivedsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(1)) { @@ -126,26 +126,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(1); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); derivedsAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -161,16 +161,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); principalsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(2)) { @@ -179,26 +179,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null) == null) + if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null) == null) { return entry.ReadTemporaryValue<long>(2); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); principalsId.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -207,17 +207,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); principalsId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalsId)); @@ -228,16 +228,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); principalsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(3)) { @@ -246,26 +246,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(3); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), - (ValueBuffer valueBuffer) => valueBuffer[3]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), + object (ValueBuffer valueBuffer) => valueBuffer[3]); principalsAlternateId.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -285,20 +285,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); rowid.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); + byte[] (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, + byte[] (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); rowid.SetSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetMaterializationSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), - (ValueBuffer valueBuffer) => valueBuffer[4]); + byte[] (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : (entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))))), + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), + object (ValueBuffer valueBuffer) => valueBuffer[4]); rowid.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -307,17 +307,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 4); rowid.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var key = runtimeEntityType.AddKey( new[] { derivedsId, derivedsAlternateId, principalsId, principalsAlternateId }); @@ -362,24 +362,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(rowid))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), (source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(rowid)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(default(Guid)), default(byte[]) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(default(byte[])))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(byte[]) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(default(byte[]))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)((IProperty)derivedsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)(((IProperty)derivedsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 5, diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..4b43c6dd1f6 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,63 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] + public static extern CompiledModelTestBase.AFlagsEnum Get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] + public static extern void Set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs index 413b6a9e951..dc28a07c6a5 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -71,19 +70,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 4, @@ -92,12 +91,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 6, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -122,24 +120,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var dependent = runtimeEntityType.FindNavigation("Dependent")!; var manyOwned = runtimeEntityType.FindNavigation("ManyOwned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Nullable<long>, Guid, Point>(default(Nullable<long>) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(default(Nullable<long>)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(default(Guid)), default(Point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(default(Point)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long?, Guid, Point>((default(long? ) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(default(long? ))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(default(Guid)), (default(Point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(default(Point))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Nullable<long>, Guid, Point>(default(Nullable<long>), default(Guid), default(Point))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long?, Guid, Point>(default(long? ), default(Guid), default(Point))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<Point>(source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<Point>((source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<Point>(default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<Point>(default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object, object, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null, UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity8)), null); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object, object, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null, PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity8)), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 15, @@ -160,14 +158,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<byte?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] - public static extern ref ICollection<CompiledModelTestBase.OwnedType> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..924e4c82620 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,23 @@ +// <auto-generated /> +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] + public static extern ref ICollection<CompiledModelTestBase.OwnedType> ManyOwned(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Principals(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataEntityType.cs index 0fcded4aa99..8d744e4fa5b 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,11 +38,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -52,17 +51,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -74,20 +73,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -96,29 +95,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var point = runtimeEntityType.AddProperty( "Point", typeof(Point), nullable: true); point.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), - (ValueBuffer valueBuffer) => valueBuffer[2]); + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), + Point (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 2), + Point (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), + object (ValueBuffer valueBuffer) => valueBuffer[2]); point.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -143,24 +141,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[], Point>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[], Point>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob))), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int, Point>(source.ContainsKey("Id") ? (int)source["Id"] : 0, source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int, Point>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0), (source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int, Point>(default(int), default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<int, Point>(default(int), default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 3, @@ -181,8 +179,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs index fed8607aef6..c9b0612784f 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalId)); @@ -79,11 +78,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -99,11 +98,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); enumDiscriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadShadowValue<CompiledModelTestBase.Enum1>(2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum1>(enumDiscriminator, 2), + CompiledModelTestBase.Enum1 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); enumDiscriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -112,27 +111,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumDiscriminator.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum1>( - (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum1 v) => v), + bool (CompiledModelTestBase.Enum1 v1, CompiledModelTestBase.Enum1 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum1 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum1 (CompiledModelTestBase.Enum1 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value), + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum1, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum1, int>( - (CompiledModelTestBase.Enum1 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum1)value))); + int (CompiledModelTestBase.Enum1 value) => ((int)(value)), + CompiledModelTestBase.Enum1 (int value) => ((CompiledModelTestBase.Enum1)(value))))); enumDiscriminator.SetSentinelFromProviderValue(0); var id = runtimeEntityType.AddProperty( @@ -142,20 +141,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); id.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity).HasValue, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance).HasValue); + byte? (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Id(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => !(DependentBaseUnsafeAccessors<byte?>.Id(entity).HasValue), + byte? (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Id(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => !(DependentBaseUnsafeAccessors<byte?>.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, byte? value) => DependentBaseUnsafeAccessors<byte?>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(id, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(id), - (ValueBuffer valueBuffer) => valueBuffer[3]); + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Id(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(id, 3), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(id), + object (ValueBuffer valueBuffer) => valueBuffer[3]); id.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -164,22 +163,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetValueComparer(new NullableValueComparer<byte>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<byte>(id.TypeMapping.KeyComparer)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { principalId, principalAlternateId }); @@ -221,19 +219,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt fieldInfo: typeof(CompiledModelTestBase.DependentBase<byte?>).GetField("<Principal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); principal.SetGetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity), - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) == null, - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance), - (CompiledModelTestBase.DependentBase<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(instance) == null); + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity), + bool (CompiledModelTestBase.DependentBase<byte?> entity) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) == null, + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance), + bool (CompiledModelTestBase.DependentBase<byte?> instance) => DependentBaseUnsafeAccessors<byte?>.Principal(instance) == null); principal.SetSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetMaterializationSetter( - (CompiledModelTestBase.DependentBase<Nullable<byte>> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity) = value); + (CompiledModelTestBase.DependentBase<byte?> entity, CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> value) => DependentBaseUnsafeAccessors<byte?>.Principal(entity) = value); principal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal((CompiledModelTestBase.DependentBase<Nullable<byte>>)entry.Entity), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<byte?>.Principal(((CompiledModelTestBase.DependentBase<byte?>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>>(principal), + CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>>(principal), null); principal.SetPropertyIndexes( index: 0, @@ -241,7 +239,6 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - principal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal", "TestNamespace") }); var dependent = principalEntityType.AddNavigation("Dependent", runtimeForeignKey, onDependent: false, @@ -252,19 +249,19 @@ public static RuntimeForeignKey CreateForeignKey2(RuntimeEntityType declaringEnt lazyLoadingEnabled: false); dependent.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(instance) == null); + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) == null, + CompiledModelTestBase.DependentBase<byte?> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(instance) == null); dependent.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, CompiledModelTestBase.DependentBase<Nullable<byte>> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, CompiledModelTestBase.DependentBase<byte?> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity) = value); dependent.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<Nullable<byte>>>(dependent), + CompiledModelTestBase.DependentBase<byte?> (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.DependentBase<byte?>>(dependent), null); dependent.SetPropertyIndexes( index: 2, @@ -286,24 +283,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id))); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1>(default(long), default(Guid), default(CompiledModelTestBase.Enum1))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentBase<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity)); + var entity = ((CompiledModelTestBase.DependentBase<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 4, @@ -326,11 +323,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<byte?> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] - public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(CompiledModelTestBase.DependentBase<byte?> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..d7a27e947be --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,18 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principal>k__BackingField")] + public static extern ref CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<TKey>> Principal(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs index e234c20e6f0..417d031abe9 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,20 +38,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 20, unicode: false); data.SetGetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<Nullable<byte>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<byte?> entity) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<byte?> instance) => DependentDerivedUnsafeAccessors<byte?>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<Nullable<byte>> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<byte?> entity, string value) => DependentDerivedUnsafeAccessors<byte?>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<Nullable<byte>>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[4]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<byte?>.Data(((CompiledModelTestBase.DependentDerived<byte?>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 4), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[4]); data.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -61,7 +60,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); data.TypeMapping = SqliteStringTypeMapping.Default; data.AddAnnotation("Relational:IsFixedLength", true); - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var money = runtimeEntityType.AddProperty( "Money", @@ -70,11 +68,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas scale: 3, sentinel: 0m); money.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), - (ValueBuffer valueBuffer) => valueBuffer[5]); + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadShadowValue<decimal>(3), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(money, 5), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(money), + object (ValueBuffer valueBuffer) => valueBuffer[5]); money.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -96,24 +94,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var money = runtimeEntityType.FindProperty("Money")!; var principal = runtimeEntityType.FindNavigation("Principal")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, Nullable<byte>, string, decimal>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)((IProperty)enumDiscriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), source.GetCurrentValue<Nullable<byte>>(id) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data)), ((ValueComparer<decimal>)((IProperty)money).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(money))); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, byte?, string, decimal>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), ((ValueComparer<CompiledModelTestBase.Enum1>)(((IProperty)enumDiscriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum1>(enumDiscriminator)), (source.GetCurrentValue<byte?>(id) == null ? null : ((ValueComparer<byte?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(id))), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data))), ((ValueComparer<decimal>)(((IProperty)money).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(money))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(source.ContainsKey("PrincipalId") ? (long)source["PrincipalId"] : 0L, source.ContainsKey("PrincipalAlternateId") ? (Guid)source["PrincipalAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("EnumDiscriminator") ? (CompiledModelTestBase.Enum1)source["EnumDiscriminator"] : CompiledModelTestBase.Enum1.Default, source.ContainsKey("Money") ? (decimal)source["Money"] : 0M)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>((source.ContainsKey("PrincipalId") ? ((long)(source["PrincipalId"])) : 0L), (source.ContainsKey("PrincipalAlternateId") ? ((Guid)(source["PrincipalAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("EnumDiscriminator") ? ((CompiledModelTestBase.Enum1)(source["EnumDiscriminator"])) : CompiledModelTestBase.Enum1.Default), (source.ContainsKey("Money") ? ((decimal)(source["Money"])) : 0M))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, CompiledModelTestBase.Enum1, decimal>(default(long), default(Guid), default(CompiledModelTestBase.Enum1), default(decimal))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.DependentDerived<Nullable<byte>>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, object>(((ValueComparer<long>)((IProperty)principalId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)((IProperty)principalAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Principal(entity8)); + var entity8 = ((CompiledModelTestBase.DependentDerived<byte?>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, object>(((ValueComparer<long>)(((IProperty)principalId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalId)), ((ValueComparer<Guid>)(((IProperty)principalAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalAlternateId)), DependentBaseUnsafeAccessors<byte?>.Principal(entity8)))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 6, @@ -134,8 +132,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<byte?> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs index 168afa9209f..fa5664c9edb 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs @@ -7,7 +7,6 @@ using System.Net; using System.Net.NetworkInformation; using System.Reflection; -using System.Runtime.CompilerServices; using System.Text; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -48,20 +47,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, valueConverter: new CompiledModelTestBase.ManyTypesIdConverter()); id.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Id(entity).Equals(default(CompiledModelTestBase.ManyTypesId)), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Id(instance).Equals(default(CompiledModelTestBase.ManyTypesId))); id.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.ManyTypesId value) => ManyTypesUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : entry.FlaggedAsTemporary(0) && UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<CompiledModelTestBase.ManyTypesId>(0) : (entry.FlaggedAsTemporary(0) && ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))).Equals(default(CompiledModelTestBase.ManyTypesId)) ? entry.ReadTemporaryValue<CompiledModelTestBase.ManyTypesId>(0) : ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Id(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.ManyTypesId>(id, 0), + CompiledModelTestBase.ManyTypesId (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<CompiledModelTestBase.ManyTypesId>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -70,30 +69,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.ManyTypesId>( - (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), - (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.ManyTypesId v) => v), + bool (CompiledModelTestBase.ManyTypesId v1, CompiledModelTestBase.ManyTypesId v2) => v1.Equals(v2), + int (CompiledModelTestBase.ManyTypesId v) => ((object)v).GetHashCode(), + CompiledModelTestBase.ManyTypesId (CompiledModelTestBase.ManyTypesId v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)), + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.ManyTypesId, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.ManyTypesId, int>( - (CompiledModelTestBase.ManyTypesId v) => v.Id, - (int v) => new CompiledModelTestBase.ManyTypesId(v)))); + int (CompiledModelTestBase.ManyTypesId v) => v.Id, + CompiledModelTestBase.ManyTypesId (int v) => new CompiledModelTestBase.ManyTypesId(v)))); id.SetCurrentValueComparer(new CurrentProviderValueComparer<CompiledModelTestBase.ManyTypesId, int>(id)); id.SetSentinelFromProviderValue(0); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id", "TestNamespace") }); var @bool = runtimeEntityType.AddProperty( "Bool", @@ -102,20 +100,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: false); @bool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bool(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bool(instance) == false); @bool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.Bool(entity) = value); @bool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), - (ValueBuffer valueBuffer) => valueBuffer[1]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(@bool, 1), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(@bool), + object (ValueBuffer valueBuffer) => valueBuffer[1]); @bool.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -124,20 +122,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @bool.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - @bool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool", "TestNamespace") }); var boolArray = runtimeEntityType.AddProperty( "BoolArray", @@ -145,20 +142,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(instance) == null); + bool[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolArray(entity) == null, + bool[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolArray(instance) == null); boolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[] value) => ManyTypesUnsafeAccessors.BoolArray(entity) = value); boolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), - (ValueBuffer valueBuffer) => valueBuffer[2]); + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[]>(boolArray, 2), + bool[] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[]>(boolArray), + object (ValueBuffer valueBuffer) => valueBuffer[2]); boolArray.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -167,37 +164,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool>(new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - boolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray", "TestNamespace") }); var boolNestedCollection = runtimeEntityType.AddProperty( "BoolNestedCollection", @@ -205,20 +201,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(instance) == null); + bool[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) == null, + bool[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolNestedCollection(instance) == null); boolNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => ManyTypesUnsafeAccessors.BoolNestedCollection(entity) = value); boolNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[3]); + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool[][]>(boolNestedCollection, 3), + bool[][] (InternalEntityEntry entry) => entry.GetCurrentValue<bool[][]>(boolNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[3]); boolNestedCollection.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -227,17 +223,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfReferenceTypesComparer<bool[][], bool[]>(new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool[]>(new JsonCollectionOfReferencesReaderWriter<bool[][], bool[]>( new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance))), @@ -246,37 +242,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonBoolReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), keyComparer: new ListOfValueTypesComparer<bool[], bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v)), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool>(new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<bool[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - boolNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection", "TestNamespace") }); var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", @@ -284,20 +279,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToStringConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(instance) == false); boolToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(entity) = value); boolToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToStringConverterProperty, 4), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -306,29 +301,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 1), converter: new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]), + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, string>( JsonStringReaderWriter.Instance, new ValueConverter<bool, string>( - (bool v) => (string)(v ? "B" : "A"), - (string v) => !string.IsNullOrEmpty(v) && (int)v.ToUpperInvariant()[0] == (int)"B".ToUpperInvariant()[0]))); + string (bool v) => ((string)((v ? "B" : "A"))), + bool (string v) => !(string.IsNullOrEmpty(v)) && ((int)(v.ToUpperInvariant()[0])) == ((int)("B".ToUpperInvariant()[0]))))); boolToStringConverterProperty.SetSentinelFromProviderValue("A"); - boolToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty", "TestNamespace") }); var boolToTwoValuesConverterProperty = runtimeEntityType.AddProperty( "BoolToTwoValuesConverterProperty", @@ -336,20 +330,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolToTwoValuesConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToTwoValuesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); boolToTwoValuesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(instance) == false); boolToTwoValuesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(entity) = value); boolToTwoValuesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToTwoValuesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToTwoValuesConverterProperty, 5), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToTwoValuesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -358,29 +352,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToTwoValuesConverterProperty.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1), + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, byte>( JsonByteReaderWriter.Instance, new ValueConverter<bool, byte>( - (bool v) => (byte)(v ? 1 : 0), - (byte v) => v == 1))); + byte (bool v) => ((byte)((v ? 1 : 0))), + bool (byte v) => v == 1))); boolToTwoValuesConverterProperty.SetSentinelFromProviderValue((byte)0); - boolToTwoValuesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty", "TestNamespace") }); var boolToZeroOneConverterProperty = runtimeEntityType.AddProperty( "BoolToZeroOneConverterProperty", @@ -389,20 +382,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BoolToZeroOneConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new BoolToZeroOneConverter<short>()); boolToZeroOneConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) == false, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(instance) == false); + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) == false, + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(instance) == false); boolToZeroOneConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, bool value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool value) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(entity) = value); boolToZeroOneConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[6]); + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BoolToZeroOneConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool (InternalEntityEntry entry) => entry.ReadOriginalValue<bool>(boolToZeroOneConverterProperty, 6), + bool (InternalEntityEntry entry) => entry.GetCurrentValue<bool>(boolToZeroOneConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -411,29 +404,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); boolToZeroOneConverterProperty.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1), + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<bool, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<bool, short>( - (bool v) => (short)(v ? 1 : 0), - (short v) => v == 1))); + short (bool v) => ((short)((v ? 1 : 0))), + bool (short v) => v == 1))); boolToZeroOneConverterProperty.SetSentinelFromProviderValue((short)0); - boolToZeroOneConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty", "TestNamespace") }); var bytes = runtimeEntityType.AddProperty( "Bytes", @@ -441,20 +433,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Bytes", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Bytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Bytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Bytes(instance) == null); bytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.Bytes(entity) = value); bytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), - (ValueBuffer valueBuffer) => valueBuffer[7]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Bytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytes, 7), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytes), + object (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -463,18 +455,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytes.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - bytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var bytesArray = runtimeEntityType.AddProperty( "BytesArray", @@ -482,20 +473,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesArray(instance) == null); bytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.BytesArray(entity) = value); bytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(bytesArray, 8), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(bytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -504,35 +495,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - bytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var bytesNestedCollection = runtimeEntityType.AddProperty( "BytesNestedCollection", @@ -540,20 +530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<BytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); bytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesNestedCollection(instance) == null); bytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.BytesNestedCollection(entity) = value); bytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[9]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(bytesNestedCollection, 9), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(bytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[9]); bytesNestedCollection.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -562,17 +552,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[][]>(new JsonCollectionOfReferencesReaderWriter<byte[][][], byte[][]>( new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance))), @@ -581,35 +571,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonByteArrayReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())))); - bytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())))); var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", @@ -619,20 +608,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueConverter: new BytesToStringConverter(), valueComparer: new ArrayStructuralComparer<byte>()); bytesToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(instance) == null); bytesToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(entity) = value); bytesToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[10]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.BytesToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(bytesToStringConverterProperty, 10), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(bytesToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -641,26 +630,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); bytesToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)), + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<byte[], string>( JsonStringReaderWriter.Instance, new ValueConverter<byte[], string>( - (byte[] v) => Convert.ToBase64String(v), - (string v) => Convert.FromBase64String(v)))); - bytesToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty", "TestNamespace") }); + string (byte[] v) => Convert.ToBase64String(v), + byte[] (string v) => Convert.FromBase64String(v)))); var castingConverterProperty = runtimeEntityType.AddProperty( "CastingConverterProperty", @@ -669,20 +657,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CastingConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CastingConverter<int, decimal>()); castingConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CastingConverterProperty(instance) == 0); castingConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.CastingConverterProperty(entity) = value); castingConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[11]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CastingConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(castingConverterProperty, 11), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(castingConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -691,27 +679,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); castingConverterProperty.TypeMapping = SqliteDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), converter: new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v), + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, decimal>( SqliteJsonDecimalReaderWriter.Instance, new ValueConverter<int, decimal>( - (int v) => (decimal)v, - (decimal v) => (int)v))); + decimal (int v) => ((decimal)(v)), + int (decimal v) => ((int)(v))))); castingConverterProperty.SetSentinelFromProviderValue(0m); - castingConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty", "TestNamespace") }); var @char = runtimeEntityType.AddProperty( "Char", @@ -720,20 +707,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Char>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: '\0'); @char.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Char(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Char(instance) == '\0'); @char.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.Char(entity) = value); @char.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), - (ValueBuffer valueBuffer) => valueBuffer[12]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Char(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(@char, 12), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(@char), + object (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -742,20 +729,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @char.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); - @char.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char", "TestNamespace") }); var charArray = runtimeEntityType.AddProperty( "CharArray", @@ -763,20 +749,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(instance) == null); + char[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharArray(entity) == null, + char[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharArray(instance) == null); charArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[] value) => ManyTypesUnsafeAccessors.CharArray(entity) = value); charArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), - (ValueBuffer valueBuffer) => valueBuffer[13]); + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[]>(charArray, 13), + char[] (InternalEntityEntry entry) => entry.GetCurrentValue<char[]>(charArray), + object (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -785,37 +771,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char>(new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - charArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray", "TestNamespace") }); var charNestedCollection = runtimeEntityType.AddProperty( "CharNestedCollection", @@ -823,20 +808,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); charNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(instance) == null); + char[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) == null, + char[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharNestedCollection(instance) == null); charNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char[][] value) => ManyTypesUnsafeAccessors.CharNestedCollection(entity) = value); charNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[14]); + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<char[][]>(charNestedCollection, 14), + char[][] (InternalEntityEntry entry) => entry.GetCurrentValue<char[][]>(charNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[14]); charNestedCollection.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -845,17 +830,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfReferenceTypesComparer<char[][], char[]>(new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char[]>(new JsonCollectionOfReferencesReaderWriter<char[][], char[]>( new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance))), @@ -864,37 +849,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonCharReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), keyComparer: new ListOfValueTypesComparer<char[], char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v)), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char>(new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<char[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")))); - charNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection", "TestNamespace") }); var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", @@ -903,20 +887,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<CharToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new CharToStringConverter()); charToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) == '\0', - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(instance) == '\0'); + char (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) == '\0', + char (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(instance) == '\0'); charToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, char value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char value) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(entity) = value); charToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.CharToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char (InternalEntityEntry entry) => entry.ReadOriginalValue<char>(charToStringConverterProperty, 15), + char (InternalEntityEntry entry) => entry.GetCurrentValue<char>(charToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -925,29 +909,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); charToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 1), converter: new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<char, string>( JsonStringReaderWriter.Instance, new ValueConverter<char, string>( - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => v.Length < 1 ? '\0' : v[0]))); + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + char (string v) => (v.Length < 1 ? '\0' : v[0])))); charToStringConverterProperty.SetSentinelFromProviderValue("\0"); - charToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty", "TestNamespace") }); var dateOnly = runtimeEntityType.AddProperty( "DateOnly", @@ -956,20 +939,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateOnly(1, 1, 1)); dateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnly(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnly(instance) == default(DateOnly)); dateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnly(entity) = value); dateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[16]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnly, 16), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( index: 16, originalValueIndex: 16, @@ -977,7 +960,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateOnly.TypeMapping = SqliteDateOnlyTypeMapping.Default; - dateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly", "TestNamespace") }); var dateOnlyArray = runtimeEntityType.AddProperty( "DateOnlyArray", @@ -985,20 +967,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(instance) == null); + DateOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) == null, + DateOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyArray(instance) == null); dateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly[] value) => ManyTypesUnsafeAccessors.DateOnlyArray(entity) = value); dateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly[]>(dateOnlyArray, 17), + DateOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly[]>(dateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( index: 17, originalValueIndex: 17, @@ -1007,23 +989,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), keyComparer: new ListOfValueTypesComparer<DateOnly[], DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v)), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateOnly>(new JsonCollectionOfStructsReaderWriter<DateOnly[], DateOnly>( JsonDateOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateOnly[], DateOnly>( JsonDateOnlyReaderWriter.Instance), elementMapping: SqliteDateOnlyTypeMapping.Default); - dateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray", "TestNamespace") }); var dateOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "DateOnlyToStringConverterProperty", @@ -1032,20 +1013,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateOnlyToStringConverter()); dateOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) == default(DateOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(instance) == default(DateOnly)); + DateOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) == default(DateOnly), + DateOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(instance) == default(DateOnly)); dateOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly value) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(entity) = value); dateOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly>(dateOnlyToStringConverterProperty, 18), + DateOnly (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( index: 18, originalValueIndex: 18, @@ -1054,29 +1035,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateOnlyToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), keyComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateOnly, string>( - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd"), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); dateOnlyToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01"); - dateOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty", "TestNamespace") }); var dateTime = runtimeEntityType.AddProperty( "DateTime", @@ -1085,20 +1065,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTime(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTime(instance) == default(DateTime)); dateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTime(entity) = value); dateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[19]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTime, 19), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTime), + object (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( index: 19, originalValueIndex: 19, @@ -1106,7 +1086,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateTime.TypeMapping = SqliteDateTimeTypeMapping.Default; - dateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime", "TestNamespace") }); var dateTimeArray = runtimeEntityType.AddProperty( "DateTimeArray", @@ -1114,20 +1093,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); dateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(instance) == null); + DateTime[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeArray(entity) == null, + DateTime[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeArray(instance) == null); dateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime[] value) => ManyTypesUnsafeAccessors.DateTimeArray(entity) = value); dateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[20]); + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(dateTimeArray, 20), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(dateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( index: 20, originalValueIndex: 20, @@ -1136,23 +1115,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - dateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray", "TestNamespace") }); var dateTimeOffsetToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBinaryConverterProperty", @@ -1161,20 +1139,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBinaryConverter()); dateTimeOffsetToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(entity) = value); dateTimeOffsetToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty, 21), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( index: 21, originalValueIndex: 21, @@ -1183,29 +1161,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBinaryConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTimeOffset, long>( - (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), - (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); + long (DateTimeOffset v) => DateTimeOffsetToBinaryConverter.ToLong(v), + DateTimeOffset (long v) => DateTimeOffsetToBinaryConverter.ToDateTimeOffset(v)))); dateTimeOffsetToBinaryConverterProperty.SetSentinelFromProviderValue(0L); - dateTimeOffsetToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty", "TestNamespace") }); var dateTimeOffsetToBytesConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToBytesConverterProperty", @@ -1214,20 +1191,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToBytesConverter()); dateTimeOffsetToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(entity) = value); dateTimeOffsetToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty, 22), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( index: 22, originalValueIndex: 22, @@ -1236,29 +1213,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 12), converter: new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<DateTimeOffset, byte[]>( - (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), - (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); + byte[] (DateTimeOffset v) => DateTimeOffsetToBytesConverter.ToBytes(v), + DateTimeOffset (byte[] v) => DateTimeOffsetToBytesConverter.FromBytes(v)))); dateTimeOffsetToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - dateTimeOffsetToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty", "TestNamespace") }); var dateTimeOffsetToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeOffsetToStringConverterProperty", @@ -1267,20 +1243,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeOffsetToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeOffsetToStringConverter()); dateTimeOffsetToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); + DateTimeOffset (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity).EqualsExact(default(DateTimeOffset)), + DateTimeOffset (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(instance).EqualsExact(default(DateTimeOffset))); dateTimeOffsetToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTimeOffset value) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(entity) = value); dateTimeOffsetToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeOffsetToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTimeOffset (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty, 23), + DateTimeOffset (InternalEntityEntry entry) => entry.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( index: 23, originalValueIndex: 23, @@ -1289,29 +1265,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeOffsetToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), keyComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTimeOffset, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTimeOffset, string>( - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz"), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture)))); dateTimeOffsetToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00+00:00"); - dateTimeOffsetToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty", "TestNamespace") }); var dateTimeToBinaryConverterProperty = runtimeEntityType.AddProperty( "DateTimeToBinaryConverterProperty", @@ -1320,20 +1295,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToBinaryConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToBinaryConverter()); dateTimeToBinaryConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(instance) == default(DateTime)); dateTimeToBinaryConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(entity) = value); dateTimeToBinaryConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[24]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToBinaryConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToBinaryConverterProperty, 24), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( index: 24, originalValueIndex: 24, @@ -1342,29 +1317,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToBinaryConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)), + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<DateTime, long>( - (DateTime v) => v.ToBinary(), - (long v) => DateTime.FromBinary(v)))); + long (DateTime v) => v.ToBinary(), + DateTime (long v) => DateTime.FromBinary(v)))); dateTimeToBinaryConverterProperty.SetSentinelFromProviderValue(0L); - dateTimeToBinaryConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty", "TestNamespace") }); var dateTimeToStringConverterProperty = runtimeEntityType.AddProperty( "DateTimeToStringConverterProperty", @@ -1373,20 +1347,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new DateTimeToStringConverter()); dateTimeToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(instance) == default(DateTime)); dateTimeToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(entity) = value); dateTimeToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[25]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToStringConverterProperty, 25), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( index: 25, originalValueIndex: 25, @@ -1395,29 +1369,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); dateTimeToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), keyComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<DateTime, string>( JsonStringReaderWriter.Instance, new ValueConverter<DateTime, string>( - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF"), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture)))); dateTimeToStringConverterProperty.SetSentinelFromProviderValue("0001-01-01 00:00:00"); - dateTimeToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty", "TestNamespace") }); var dateTimeToTicksConverterProperty = runtimeEntityType.AddProperty( "DateTimeToTicksConverterProperty", @@ -1426,20 +1399,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DateTimeToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); dateTimeToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) == default(DateTime), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(instance) == default(DateTime)); + DateTime (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) == default(DateTime), + DateTime (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(instance) == default(DateTime)); dateTimeToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, DateTime value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime value) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(entity) = value); dateTimeToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DateTimeToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime>(dateTimeToTicksConverterProperty, 26), + DateTime (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( index: 26, originalValueIndex: 26, @@ -1447,7 +1420,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); dateTimeToTicksConverterProperty.TypeMapping = SqliteDateTimeTypeMapping.Default; - dateTimeToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty", "TestNamespace") }); var @decimal = runtimeEntityType.AddProperty( "Decimal", @@ -1456,20 +1428,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Decimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0m); @decimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Decimal(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Decimal(instance) == 0M); @decimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.Decimal(entity) = value); @decimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[27]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Decimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(@decimal, 27), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(@decimal), + object (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( index: 27, originalValueIndex: 27, @@ -1477,7 +1449,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); @decimal.TypeMapping = SqliteDecimalTypeMapping.Default; - @decimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal", "TestNamespace") }); var decimalArray = runtimeEntityType.AddProperty( "DecimalArray", @@ -1485,20 +1456,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); decimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(instance) == null); + decimal[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalArray(entity) == null, + decimal[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalArray(instance) == null); decimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal[] value) => ManyTypesUnsafeAccessors.DecimalArray(entity) = value); decimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[28]); + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal[] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal[]>(decimalArray, 28), + decimal[] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal[]>(decimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( index: 28, originalValueIndex: 28, @@ -1507,23 +1478,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), keyComparer: new ListOfValueTypesComparer<decimal[], decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v)), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<decimal>(new JsonCollectionOfStructsReaderWriter<decimal[], decimal>( SqliteJsonDecimalReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<decimal[], decimal>( SqliteJsonDecimalReaderWriter.Instance), elementMapping: SqliteDecimalTypeMapping.Default); - decimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray", "TestNamespace") }); var decimalNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToBytesConverterProperty", @@ -1532,20 +1502,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<decimal>()); decimalNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(instance) == 0M); decimalNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(entity) = value); decimalNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[29]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToBytesConverterProperty, 29), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( index: 29, originalValueIndex: 29, @@ -1554,29 +1524,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)), + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<decimal, byte[]>( - (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), - (byte[] v) => v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v)))); + byte[] (decimal v) => NumberToBytesConverter<decimal>.DecimalToBytes(v), + decimal (byte[] v) => (v == null ? 0M : NumberToBytesConverter<decimal>.BytesToDecimal(v))))); decimalNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - decimalNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty", "TestNamespace") }); var decimalNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DecimalNumberToStringConverterProperty", @@ -1585,20 +1554,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DecimalNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<decimal>()); decimalNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) == 0M, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(instance) == 0M); + decimal (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) == 0M, + decimal (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(instance) == 0M); decimalNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, decimal value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal value) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(entity) = value); decimalNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), - (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DecimalNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal>(decimalNumberToStringConverterProperty, 30), + decimal (InternalEntityEntry entry) => entry.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( index: 30, originalValueIndex: 30, @@ -1607,29 +1576,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); decimalNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), keyComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<decimal, string>( JsonStringReaderWriter.Instance, new ValueConverter<decimal, string>( - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); decimalNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - decimalNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty", "TestNamespace") }); var @double = runtimeEntityType.AddProperty( "Double", @@ -1638,20 +1606,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Double>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0.0); @double.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Double(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Double(instance).Equals(0D)); @double.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.Double(entity) = value); @double.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), - (ValueBuffer valueBuffer) => valueBuffer[31]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Double(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(@double, 31), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(@double), + object (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( index: 31, originalValueIndex: 31, @@ -1660,20 +1628,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @double.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); - @double.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double", "TestNamespace") }); var doubleArray = runtimeEntityType.AddProperty( "DoubleArray", @@ -1681,20 +1648,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("DoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); doubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(instance) == null); + double[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleArray(entity) == null, + double[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleArray(instance) == null); doubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double[] value) => ManyTypesUnsafeAccessors.DoubleArray(entity) = value); doubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), - (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[32]); + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double[] (InternalEntityEntry entry) => entry.ReadOriginalValue<double[]>(doubleArray, 32), + double[] (InternalEntityEntry entry) => entry.GetCurrentValue<double[]>(doubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( index: 32, originalValueIndex: 32, @@ -1703,37 +1670,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), keyComparer: new ListOfValueTypesComparer<double[], double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v)), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<double>(new JsonCollectionOfStructsReaderWriter<double[], double>( JsonDoubleReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<double[], double>( JsonDoubleReaderWriter.Instance), elementMapping: DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - doubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray", "TestNamespace") }); var doubleNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToBytesConverterProperty", @@ -1742,20 +1708,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<double>()); doubleNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(instance).Equals(0D)); doubleNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(entity) = value); doubleNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[33]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToBytesConverterProperty, 33), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( index: 33, originalValueIndex: 33, @@ -1764,29 +1730,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 8), converter: new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)), + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<double, byte[]>( - (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0)))); + byte[] (double v) => NumberToBytesConverter<double>.ReverseLong(BitConverter.GetBytes(v)), + double (byte[] v) => (v == null ? 0D : BitConverter.ToDouble(NumberToBytesConverter<double>.ReverseLong(v), 0))))); doubleNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }); - doubleNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty", "TestNamespace") }); var doubleNumberToStringConverterProperty = runtimeEntityType.AddProperty( "DoubleNumberToStringConverterProperty", @@ -1795,20 +1760,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<DoubleNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<double>()); doubleNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity).Equals(0D), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(instance).Equals(0D)); + double (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity).Equals(0D), + double (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(instance).Equals(0D)); doubleNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, double value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double value) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(entity) = value); doubleNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), - (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[34]); + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.DoubleNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double (InternalEntityEntry entry) => entry.ReadOriginalValue<double>(doubleNumberToStringConverterProperty, 34), + double (InternalEntityEntry entry) => entry.GetCurrentValue<double>(doubleNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( index: 34, originalValueIndex: 34, @@ -1817,29 +1782,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); doubleNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<double, string>( JsonStringReaderWriter.Instance, new ValueConverter<double, string>( - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v), - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v))), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); doubleNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - doubleNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty", "TestNamespace") }); var enum16 = runtimeEntityType.AddProperty( "Enum16", @@ -1847,20 +1811,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16(entity) = value); enum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), - (ValueBuffer valueBuffer) => valueBuffer[35]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16, 35), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16), + object (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( index: 35, originalValueIndex: 35, @@ -1869,29 +1833,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); enum16.SetSentinelFromProviderValue((short)0); - enum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16", "TestNamespace") }); var enum16Array = runtimeEntityType.AddProperty( "Enum16Array", @@ -1899,20 +1862,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Array(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Array(instance) == null); enum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16Array(entity) = value); enum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[36]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16Array, 36), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( index: 36, originalValueIndex: 36, @@ -1921,53 +1884,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - enum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var enum16AsString = runtimeEntityType.AddProperty( "Enum16AsString", @@ -1976,20 +1938,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity), (object)CompiledModelTestBase.Enum16.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(instance), (object)CompiledModelTestBase.Enum16.Default)); + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(entity))), ((object)(CompiledModelTestBase.Enum16.Default))), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum16AsString(instance))), ((object)(CompiledModelTestBase.Enum16.Default)))); enum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16 value) => ManyTypesUnsafeAccessors.Enum16AsString(entity) = value); enum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[37]); + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16>(enum16AsString, 37), + CompiledModelTestBase.Enum16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( index: 37, originalValueIndex: 37, @@ -1998,27 +1960,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))); enum16AsString.SetSentinelFromProviderValue("Default"); - enum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString", "TestNamespace") }); var enum16AsStringArray = runtimeEntityType.AddProperty( "Enum16AsStringArray", @@ -2026,20 +1987,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringArray(instance) == null); enum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16[] value) => ManyTypesUnsafeAccessors.Enum16AsStringArray(entity) = value); enum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[38]); + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray, 38), + CompiledModelTestBase.Enum16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( index: 38, originalValueIndex: 38, @@ -2048,51 +2009,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); - enum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); var enum16AsStringCollection = runtimeEntityType.AddProperty( "Enum16AsStringCollection", @@ -2100,20 +2060,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(instance) == null); enum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(entity) = value); enum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[39]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection, 39), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( index: 39, originalValueIndex: 39, @@ -2122,51 +2082,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, string>( - (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); - enum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum16 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum16 (string v) => StringEnumConverter<CompiledModelTestBase.Enum16, string, CompiledModelTestBase.Enum16>.ConvertToEnum(v))))); var enum16Collection = runtimeEntityType.AddProperty( "Enum16Collection", @@ -2174,20 +2133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum16Collection(instance) == null); enum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16> value) => ManyTypesUnsafeAccessors.Enum16Collection(entity) = value); enum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[40]); + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16>>(enum16Collection, 40), + List<CompiledModelTestBase.Enum16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( index: 40, originalValueIndex: 40, @@ -2196,53 +2155,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v)), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - enum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var enum32 = runtimeEntityType.AddProperty( "Enum32", @@ -2250,20 +2208,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32(entity) = value); enum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), - (ValueBuffer valueBuffer) => valueBuffer[41]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32, 41), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32), + object (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( index: 41, originalValueIndex: 41, @@ -2272,29 +2230,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enum32.SetSentinelFromProviderValue(0); - enum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32", "TestNamespace") }); var enum32Array = runtimeEntityType.AddProperty( "Enum32Array", @@ -2302,20 +2259,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Array(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Array(instance) == null); enum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32Array(entity) = value); enum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[42]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32Array, 42), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( index: 42, originalValueIndex: 42, @@ -2324,53 +2281,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - enum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var enum32AsString = runtimeEntityType.AddProperty( "Enum32AsString", @@ -2379,20 +2335,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum32AsString(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.Enum32AsString(entity) = value); enum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[43]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enum32AsString, 43), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( index: 43, originalValueIndex: 43, @@ -2401,27 +2357,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enum32AsString.SetSentinelFromProviderValue("Default"); - enum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString", "TestNamespace") }); var enum32AsStringArray = runtimeEntityType.AddProperty( "Enum32AsStringArray", @@ -2429,20 +2384,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringArray(instance) == null); enum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32[] value) => ManyTypesUnsafeAccessors.Enum32AsStringArray(entity) = value); enum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[44]); + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray, 44), + CompiledModelTestBase.Enum32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( index: 44, originalValueIndex: 44, @@ -2451,51 +2406,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); - enum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); var enum32AsStringCollection = runtimeEntityType.AddProperty( "Enum32AsStringCollection", @@ -2503,20 +2457,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(instance) == null); enum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(entity) = value); enum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[45]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection, 45), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( index: 45, originalValueIndex: 45, @@ -2525,51 +2479,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); - enum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v))))); var enum32Collection = runtimeEntityType.AddProperty( "Enum32Collection", @@ -2577,20 +2530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32Collection(instance) == null); enum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32> value) => ManyTypesUnsafeAccessors.Enum32Collection(entity) = value); enum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[46]); + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>>(enum32Collection, 46), + List<CompiledModelTestBase.Enum32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( index: 46, originalValueIndex: 46, @@ -2599,53 +2552,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - enum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var enum32NestedCollection = runtimeEntityType.AddProperty( "Enum32NestedCollection", @@ -2653,20 +2605,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(instance) == null); + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) == null, + List<CompiledModelTestBase.Enum32>[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum32NestedCollection(instance) == null); enum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32>[][] value) => ManyTypesUnsafeAccessors.Enum32NestedCollection(entity) = value); enum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[47]); + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection, 47), + List<CompiledModelTestBase.Enum32>[][] (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[47]); enum32NestedCollection.SetPropertyIndexes( index: 47, originalValueIndex: 47, @@ -2675,109 +2627,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>(new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<List<CompiledModelTestBase.Enum32>[]>(new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[][], List<CompiledModelTestBase.Enum32>[]>( new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>(new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<List<CompiledModelTestBase.Enum32>>(new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<CompiledModelTestBase.Enum32>[], List<CompiledModelTestBase.Enum32>>( new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum32>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); - enum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); var enum64 = runtimeEntityType.AddProperty( "Enum64", @@ -2785,20 +2736,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64(entity) = value); enum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), - (ValueBuffer valueBuffer) => valueBuffer[48]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64, 48), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64), + object (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( index: 48, originalValueIndex: 48, @@ -2807,29 +2758,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); enum64.SetSentinelFromProviderValue(0L); - enum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64", "TestNamespace") }); var enum64Array = runtimeEntityType.AddProperty( "Enum64Array", @@ -2837,20 +2787,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Array(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Array(instance) == null); enum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64Array(entity) = value); enum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[49]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64Array, 49), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( index: 49, originalValueIndex: 49, @@ -2859,53 +2809,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - enum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var enum64AsString = runtimeEntityType.AddProperty( "Enum64AsString", @@ -2914,20 +2863,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity), (object)CompiledModelTestBase.Enum64.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(instance), (object)CompiledModelTestBase.Enum64.Default)); + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(entity))), ((object)(CompiledModelTestBase.Enum64.Default))), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum64AsString(instance))), ((object)(CompiledModelTestBase.Enum64.Default)))); enum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64 value) => ManyTypesUnsafeAccessors.Enum64AsString(entity) = value); enum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[50]); + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64>(enum64AsString, 50), + CompiledModelTestBase.Enum64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( index: 50, originalValueIndex: 50, @@ -2936,27 +2885,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))); enum64AsString.SetSentinelFromProviderValue("Default"); - enum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString", "TestNamespace") }); var enum64AsStringArray = runtimeEntityType.AddProperty( "Enum64AsStringArray", @@ -2964,20 +2912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringArray(instance) == null); enum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64[] value) => ManyTypesUnsafeAccessors.Enum64AsStringArray(entity) = value); enum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[51]); + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray, 51), + CompiledModelTestBase.Enum64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( index: 51, originalValueIndex: 51, @@ -2986,51 +2934,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); - enum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); var enum64AsStringCollection = runtimeEntityType.AddProperty( "Enum64AsStringCollection", @@ -3038,20 +2985,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(instance) == null); enum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(entity) = value); enum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[52]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection, 52), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( index: 52, originalValueIndex: 52, @@ -3060,51 +3007,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, string>( - (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); - enum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum64 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum64 (string v) => StringEnumConverter<CompiledModelTestBase.Enum64, string, CompiledModelTestBase.Enum64>.ConvertToEnum(v))))); var enum64Collection = runtimeEntityType.AddProperty( "Enum64Collection", @@ -3112,20 +3058,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum64Collection(instance) == null); enum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64> value) => ManyTypesUnsafeAccessors.Enum64Collection(entity) = value); enum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[53]); + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64>>(enum64Collection, 53), + List<CompiledModelTestBase.Enum64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( index: 53, originalValueIndex: 53, @@ -3134,53 +3080,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v)), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - enum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var enum8 = runtimeEntityType.AddProperty( "Enum8", @@ -3188,20 +3133,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8(entity) = value); enum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), - (ValueBuffer valueBuffer) => valueBuffer[54]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8, 54), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8), + object (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( index: 54, originalValueIndex: 54, @@ -3210,29 +3155,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); enum8.SetSentinelFromProviderValue((sbyte)0); - enum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8", "TestNamespace") }); var enum8Array = runtimeEntityType.AddProperty( "Enum8Array", @@ -3240,20 +3184,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Array(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Array(instance) == null); enum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8Array(entity) = value); enum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[55]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8Array, 55), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( index: 55, originalValueIndex: 55, @@ -3262,53 +3206,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - enum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var enum8AsString = runtimeEntityType.AddProperty( "Enum8AsString", @@ -3317,20 +3260,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity), (object)CompiledModelTestBase.Enum8.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(instance), (object)CompiledModelTestBase.Enum8.Default)); + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(entity))), ((object)(CompiledModelTestBase.Enum8.Default))), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.Enum8AsString(instance))), ((object)(CompiledModelTestBase.Enum8.Default)))); enum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8 value) => ManyTypesUnsafeAccessors.Enum8AsString(entity) = value); enum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[56]); + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8>(enum8AsString, 56), + CompiledModelTestBase.Enum8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( index: 56, originalValueIndex: 56, @@ -3339,27 +3282,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))); enum8AsString.SetSentinelFromProviderValue("Default"); - enum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString", "TestNamespace") }); var enum8AsStringArray = runtimeEntityType.AddProperty( "Enum8AsStringArray", @@ -3367,20 +3309,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringArray(instance) == null); enum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[] value) => ManyTypesUnsafeAccessors.Enum8AsStringArray(entity) = value); enum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[57]); + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray, 57), + CompiledModelTestBase.Enum8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( index: 57, originalValueIndex: 57, @@ -3389,51 +3331,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); - enum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); var enum8AsStringCollection = runtimeEntityType.AddProperty( "Enum8AsStringCollection", @@ -3441,20 +3382,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(instance) == null); enum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(entity) = value); enum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[58]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection, 58), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( index: 58, originalValueIndex: 58, @@ -3463,51 +3404,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, string>( - (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); - enum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.Enum8 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum8 (string v) => StringEnumConverter<CompiledModelTestBase.Enum8, string, CompiledModelTestBase.Enum8>.ConvertToEnum(v))))); var enum8Collection = runtimeEntityType.AddProperty( "Enum8Collection", @@ -3515,20 +3455,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8Collection(instance) == null); enum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8> value) => ManyTypesUnsafeAccessors.Enum8Collection(entity) = value); enum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[59]); + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8>>(enum8Collection, 59), + List<CompiledModelTestBase.Enum8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( index: 59, originalValueIndex: 59, @@ -3537,53 +3477,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.Enum8>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - enum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var enum8NestedCollection = runtimeEntityType.AddProperty( "Enum8NestedCollection", @@ -3591,20 +3530,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Enum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Enum8NestedCollection(instance) == null); enum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => ManyTypesUnsafeAccessors.Enum8NestedCollection(entity) = value); enum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[60]); + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Enum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection, 60), + CompiledModelTestBase.Enum8[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[60]); enum8NestedCollection.SetPropertyIndexes( index: 60, originalValueIndex: 60, @@ -3613,80 +3552,79 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>(new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum8[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))); - enum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", @@ -3695,20 +3633,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToNumberConverter<CompiledModelTestBase.Enum32, int>()); enumToNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(entity) = value); enumToNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[61]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty, 61), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( index: 61, originalValueIndex: 61, @@ -3717,29 +3655,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); enumToNumberConverterProperty.SetSentinelFromProviderValue(0); - enumToNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty", "TestNamespace") }); var enumToStringConverterProperty = runtimeEntityType.AddProperty( "EnumToStringConverterProperty", @@ -3748,20 +3685,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new EnumToStringConverter<CompiledModelTestBase.Enum32>()); enumToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity), (object)CompiledModelTestBase.Enum32.Default), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(instance), (object)CompiledModelTestBase.Enum32.Default)); + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity))), ((object)(CompiledModelTestBase.Enum32.Default))), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumToStringConverterProperty(instance))), ((object)(CompiledModelTestBase.Enum32.Default)))); enumToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32 value) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(entity) = value); enumToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[62]); + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty, 62), + CompiledModelTestBase.Enum32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( index: 62, originalValueIndex: 62, @@ -3770,27 +3707,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, string>( - (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.Enum32 v) => ((object)v).ToString(), + CompiledModelTestBase.Enum32 (string v) => StringEnumConverter<CompiledModelTestBase.Enum32, string, CompiledModelTestBase.Enum32>.ConvertToEnum(v)))); enumToStringConverterProperty.SetSentinelFromProviderValue("Default"); - enumToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty", "TestNamespace") }); var enumU16 = runtimeEntityType.AddProperty( "EnumU16", @@ -3798,20 +3734,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16(entity) = value); enumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[63]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16, 63), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16), + object (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( index: 63, originalValueIndex: 63, @@ -3820,29 +3756,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); enumU16.SetSentinelFromProviderValue((ushort)0); - enumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16", "TestNamespace") }); var enumU16Array = runtimeEntityType.AddProperty( "EnumU16Array", @@ -3850,20 +3785,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Array(instance) == null); enumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16Array(entity) = value); enumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[64]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16Array, 64), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( index: 64, originalValueIndex: 64, @@ -3872,53 +3807,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - enumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var enumU16AsString = runtimeEntityType.AddProperty( "EnumU16AsString", @@ -3927,20 +3861,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity), (object)CompiledModelTestBase.EnumU16.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(instance), (object)CompiledModelTestBase.EnumU16.Min)); + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(entity))), ((object)(CompiledModelTestBase.EnumU16.Min))), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU16AsString(instance))), ((object)(CompiledModelTestBase.EnumU16.Min)))); enumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16 value) => ManyTypesUnsafeAccessors.EnumU16AsString(entity) = value); enumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[65]); + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16>(enumU16AsString, 65), + CompiledModelTestBase.EnumU16 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( index: 65, originalValueIndex: 65, @@ -3949,27 +3883,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))); enumU16AsString.SetSentinelFromProviderValue("Min"); - enumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString", "TestNamespace") }); var enumU16AsStringArray = runtimeEntityType.AddProperty( "EnumU16AsStringArray", @@ -3977,20 +3910,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(instance) == null); enumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16[] value) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(entity) = value); enumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[66]); + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray, 66), + CompiledModelTestBase.EnumU16[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( index: 66, originalValueIndex: 66, @@ -3999,51 +3932,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); - enumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); var enumU16AsStringCollection = runtimeEntityType.AddProperty( "EnumU16AsStringCollection", @@ -4051,20 +3983,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(instance) == null); enumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(entity) = value); enumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[67]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection, 67), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( index: 67, originalValueIndex: 67, @@ -4073,51 +4005,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, string>( - (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); - enumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU16 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU16 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU16, string, CompiledModelTestBase.EnumU16>.ConvertToEnum(v))))); var enumU16Collection = runtimeEntityType.AddProperty( "EnumU16Collection", @@ -4125,20 +4056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU16Collection(instance) == null); enumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16> value) => ManyTypesUnsafeAccessors.EnumU16Collection(entity) = value); enumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection, 68), + List<CompiledModelTestBase.EnumU16> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( index: 68, originalValueIndex: 68, @@ -4147,53 +4078,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v)), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - enumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var enumU32 = runtimeEntityType.AddProperty( "EnumU32", @@ -4201,20 +4131,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32(entity) = value); enumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[69]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32, 69), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32), + object (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( index: 69, originalValueIndex: 69, @@ -4223,29 +4153,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); enumU32.SetSentinelFromProviderValue(0u); - enumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32", "TestNamespace") }); var enumU32Array = runtimeEntityType.AddProperty( "EnumU32Array", @@ -4253,20 +4182,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Array(instance) == null); enumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32Array(entity) = value); enumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[70]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32Array, 70), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( index: 70, originalValueIndex: 70, @@ -4275,53 +4204,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - enumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var enumU32AsString = runtimeEntityType.AddProperty( "EnumU32AsString", @@ -4330,20 +4258,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity), (object)CompiledModelTestBase.EnumU32.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(instance), (object)CompiledModelTestBase.EnumU32.Min)); + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(entity))), ((object)(CompiledModelTestBase.EnumU32.Min))), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU32AsString(instance))), ((object)(CompiledModelTestBase.EnumU32.Min)))); enumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32 value) => ManyTypesUnsafeAccessors.EnumU32AsString(entity) = value); enumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[71]); + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32>(enumU32AsString, 71), + CompiledModelTestBase.EnumU32 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( index: 71, originalValueIndex: 71, @@ -4352,27 +4280,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))); enumU32AsString.SetSentinelFromProviderValue("Min"); - enumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString", "TestNamespace") }); var enumU32AsStringArray = runtimeEntityType.AddProperty( "EnumU32AsStringArray", @@ -4380,20 +4307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(instance) == null); enumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32[] value) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(entity) = value); enumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[72]); + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray, 72), + CompiledModelTestBase.EnumU32[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( index: 72, originalValueIndex: 72, @@ -4402,51 +4329,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); - enumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); var enumU32AsStringCollection = runtimeEntityType.AddProperty( "EnumU32AsStringCollection", @@ -4454,20 +4380,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(instance) == null); enumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(entity) = value); enumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[73]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection, 73), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( index: 73, originalValueIndex: 73, @@ -4476,51 +4402,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, string>( - (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); - enumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU32 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU32 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU32, string, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))))); var enumU32Collection = runtimeEntityType.AddProperty( "EnumU32Collection", @@ -4528,20 +4453,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU32Collection(instance) == null); enumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32> value) => ManyTypesUnsafeAccessors.EnumU32Collection(entity) = value); enumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection, 74), + List<CompiledModelTestBase.EnumU32> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( index: 74, originalValueIndex: 74, @@ -4550,53 +4475,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v)), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - enumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var enumU64 = runtimeEntityType.AddProperty( "EnumU64", @@ -4604,20 +4528,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64(entity) = value); enumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[75]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64, 75), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64), + object (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( index: 75, originalValueIndex: 75, @@ -4626,27 +4550,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); enumU64.SetSentinelFromProviderValue(0ul); - enumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64", "TestNamespace") }); var enumU64Array = runtimeEntityType.AddProperty( "EnumU64Array", @@ -4654,20 +4577,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Array(instance) == null); enumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64Array(entity) = value); enumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[76]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64Array, 76), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( index: 76, originalValueIndex: 76, @@ -4676,51 +4599,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - enumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var enumU64AsString = runtimeEntityType.AddProperty( "EnumU64AsString", @@ -4729,20 +4651,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity), (object)CompiledModelTestBase.EnumU64.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(instance), (object)CompiledModelTestBase.EnumU64.Min)); + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(entity))), ((object)(CompiledModelTestBase.EnumU64.Min))), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU64AsString(instance))), ((object)(CompiledModelTestBase.EnumU64.Min)))); enumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64 value) => ManyTypesUnsafeAccessors.EnumU64AsString(entity) = value); enumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[77]); + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64>(enumU64AsString, 77), + CompiledModelTestBase.EnumU64 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( index: 77, originalValueIndex: 77, @@ -4751,27 +4673,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))); enumU64AsString.SetSentinelFromProviderValue("Min"); - enumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString", "TestNamespace") }); var enumU64AsStringArray = runtimeEntityType.AddProperty( "EnumU64AsStringArray", @@ -4779,20 +4700,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(instance) == null); enumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[] value) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(entity) = value); enumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[78]); + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray, 78), + CompiledModelTestBase.EnumU64[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( index: 78, originalValueIndex: 78, @@ -4801,51 +4722,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); - enumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); var enumU64AsStringCollection = runtimeEntityType.AddProperty( "EnumU64AsStringCollection", @@ -4853,20 +4773,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(instance) == null); enumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(entity) = value); enumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[79]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection, 79), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( index: 79, originalValueIndex: 79, @@ -4875,51 +4795,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, string>( - (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); - enumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU64 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU64 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU64, string, CompiledModelTestBase.EnumU64>.ConvertToEnum(v))))); var enumU64Collection = runtimeEntityType.AddProperty( "EnumU64Collection", @@ -4927,20 +4846,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64Collection(instance) == null); enumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64> value) => ManyTypesUnsafeAccessors.EnumU64Collection(entity) = value); enumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection, 80), + List<CompiledModelTestBase.EnumU64> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( index: 80, originalValueIndex: 80, @@ -4949,51 +4868,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - enumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var enumU64NestedCollection = runtimeEntityType.AddProperty( "EnumU64NestedCollection", @@ -5001,20 +4919,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(instance) == null); enumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(entity) = value); enumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection, 81), + CompiledModelTestBase.EnumU64[][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[81]); enumU64NestedCollection.SetPropertyIndexes( index: 81, originalValueIndex: 81, @@ -5023,78 +4941,77 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>(new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU64[]>( new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))); - enumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); var enumU8 = runtimeEntityType.AddProperty( "EnumU8", @@ -5102,20 +5019,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8(entity) = value); enumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[82]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8, 82), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8), + object (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( index: 82, originalValueIndex: 82, @@ -5124,29 +5041,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); enumU8.SetSentinelFromProviderValue((byte)0); - enumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8", "TestNamespace") }); var enumU8Array = runtimeEntityType.AddProperty( "EnumU8Array", @@ -5154,20 +5070,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Array(instance) == null); enumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8Array(entity) = value); enumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[83]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8Array, 83), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( index: 83, originalValueIndex: 83, @@ -5176,53 +5092,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - enumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var enumU8AsString = runtimeEntityType.AddProperty( "EnumU8AsString", @@ -5231,20 +5146,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), providerPropertyType: typeof(string)); enumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity), (object)CompiledModelTestBase.EnumU8.Min), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(instance), (object)CompiledModelTestBase.EnumU8.Min)); + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(entity))), ((object)(CompiledModelTestBase.EnumU8.Min))), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => object.Equals(((object)(ManyTypesUnsafeAccessors.EnumU8AsString(instance))), ((object)(CompiledModelTestBase.EnumU8.Min)))); enumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8 value) => ManyTypesUnsafeAccessors.EnumU8AsString(entity) = value); enumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[84]); + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8>(enumU8AsString, 84), + CompiledModelTestBase.EnumU8 (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( index: 84, originalValueIndex: 84, @@ -5253,27 +5168,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsString.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))); enumU8AsString.SetSentinelFromProviderValue("Min"); - enumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString", "TestNamespace") }); var enumU8AsStringArray = runtimeEntityType.AddProperty( "EnumU8AsStringArray", @@ -5281,20 +5195,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(instance) == null); enumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8[] value) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(entity) = value); enumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray, 85), + CompiledModelTestBase.EnumU8[] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( index: 85, originalValueIndex: 85, @@ -5303,51 +5217,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); - enumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray", "TestNamespace") }); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); var enumU8AsStringCollection = runtimeEntityType.AddProperty( "EnumU8AsStringCollection", @@ -5355,20 +5268,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(instance) == null); enumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(entity) = value); enumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[86]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection, 86), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( index: 86, originalValueIndex: 86, @@ -5377,51 +5290,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, string>( JsonStringReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, string>( - (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), - (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); - enumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection", "TestNamespace") }); + string (CompiledModelTestBase.EnumU8 v) => ((object)v).ToString(), + CompiledModelTestBase.EnumU8 (string v) => StringEnumConverter<CompiledModelTestBase.EnumU8, string, CompiledModelTestBase.EnumU8>.ConvertToEnum(v))))); var enumU8Collection = runtimeEntityType.AddProperty( "EnumU8Collection", @@ -5429,20 +5341,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<EnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.EnumU8Collection(instance) == null); enumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8> value) => ManyTypesUnsafeAccessors.EnumU8Collection(entity) = value); enumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[87]); + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.EnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection, 87), + List<CompiledModelTestBase.EnumU8> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( index: 87, originalValueIndex: 87, @@ -5451,53 +5363,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), keyComparer: new ListOfValueTypesComparer<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v)), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8>(new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<CompiledModelTestBase.EnumU8>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - enumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var @float = runtimeEntityType.AddProperty( "Float", @@ -5506,20 +5417,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Float>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0f); @float.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity).Equals(0F), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(instance).Equals(0F)); + float (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Float(entity).Equals(0F), + float (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Float(instance).Equals(0F)); @float.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float value) => ManyTypesUnsafeAccessors.Float(entity) = value); @float.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), - (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), - (ValueBuffer valueBuffer) => valueBuffer[88]); + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Float(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float (InternalEntityEntry entry) => entry.ReadOriginalValue<float>(@float, 88), + float (InternalEntityEntry entry) => entry.GetCurrentValue<float>(@float), + object (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( index: 88, originalValueIndex: 88, @@ -5528,20 +5439,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); @float.TypeMapping = FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); - @float.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float", "TestNamespace") }); var floatArray = runtimeEntityType.AddProperty( "FloatArray", @@ -5549,20 +5459,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("FloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<FloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); floatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(instance) == null); + float[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.FloatArray(entity) == null, + float[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.FloatArray(instance) == null); floatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, float[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float[] value) => ManyTypesUnsafeAccessors.FloatArray(entity) = value); floatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), - (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.FloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float[] (InternalEntityEntry entry) => entry.ReadOriginalValue<float[]>(floatArray, 89), + float[] (InternalEntityEntry entry) => entry.GetCurrentValue<float[]>(floatArray), + object (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( index: 89, originalValueIndex: 89, @@ -5571,37 +5481,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); floatArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), keyComparer: new ListOfValueTypesComparer<float[], float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v)), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<float>(new JsonCollectionOfStructsReaderWriter<float[], float>( JsonFloatReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<float[], float>( JsonFloatReaderWriter.Instance), elementMapping: FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - floatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray", "TestNamespace") }); var guid = runtimeEntityType.AddProperty( "Guid", @@ -5610,20 +5519,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Guid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new Guid("00000000-0000-0000-0000-000000000000")); guid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Guid(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Guid(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.Guid(entity) = value); guid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), - (ValueBuffer valueBuffer) => valueBuffer[90]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Guid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guid, 90), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guid), + object (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( index: 90, originalValueIndex: 90, @@ -5631,7 +5540,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); guid.TypeMapping = SqliteGuidTypeMapping.Default; - guid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid", "TestNamespace") }); var guidArray = runtimeEntityType.AddProperty( "GuidArray", @@ -5639,20 +5547,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(instance) == null); + Guid[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidArray(entity) == null, + Guid[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidArray(instance) == null); guidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid[] value) => ManyTypesUnsafeAccessors.GuidArray(entity) = value); guidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[91]); + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid[]>(guidArray, 91), + Guid[] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid[]>(guidArray), + object (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( index: 91, originalValueIndex: 91, @@ -5661,23 +5569,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid>(new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default); - guidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray", "TestNamespace") }); var guidNestedCollection = runtimeEntityType.AddProperty( "GuidNestedCollection", @@ -5685,20 +5592,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); guidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(instance) == null); + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) == null, + ICollection<Guid[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidNestedCollection(instance) == null); guidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ICollection<Guid[][]> value) => ManyTypesUnsafeAccessors.GuidNestedCollection(entity) = value); guidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[92]); + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<ICollection<Guid[][]>>(guidNestedCollection, 92), + ICollection<Guid[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[92]); guidNestedCollection.SetPropertyIndexes( index: 92, originalValueIndex: 92, @@ -5707,17 +5614,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<Guid[][]>, Guid[][]>(new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid[][]>(new JsonCollectionOfReferencesReaderWriter<List<Guid[][]>, Guid[][]>( new JsonCollectionOfReferencesReaderWriter<Guid[][], Guid[]>( new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( @@ -5728,17 +5635,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfReferenceTypesComparer<Guid[][], Guid[]>(new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid[]>(new JsonCollectionOfReferencesReaderWriter<Guid[][], Guid[]>( new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance))), @@ -5747,23 +5654,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), keyComparer: new ListOfValueTypesComparer<Guid[], Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid>(new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<Guid[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default))); - guidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection", "TestNamespace") }); var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", @@ -5772,20 +5678,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToBytesConverter()); guidToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(entity) = value); guidToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[93]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToBytesConverterProperty, 93), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( index: 93, originalValueIndex: 93, @@ -5794,29 +5700,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)), + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<Guid, byte[]>( - (Guid v) => v.ToByteArray(), - (byte[] v) => new Guid(v)))); + byte[] (Guid v) => v.ToByteArray(), + Guid (byte[] v) => new Guid(v)))); guidToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); - guidToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty", "TestNamespace") }); var guidToStringConverterProperty = runtimeEntityType.AddProperty( "GuidToStringConverterProperty", @@ -5825,20 +5730,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<GuidToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new GuidToStringConverter()); guidToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(instance) == new Guid("00000000-0000-0000-0000-000000000000")); guidToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Guid value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid value) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(entity) = value); guidToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), - (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[94]); + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.GuidToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(guidToStringConverterProperty, 94), + Guid (InternalEntityEntry entry) => entry.GetCurrentValue<Guid>(guidToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( index: 94, originalValueIndex: 94, @@ -5847,29 +5752,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); guidToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), keyComparer: new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 36), converter: new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)), + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Guid, string>( JsonStringReaderWriter.Instance, new ValueConverter<Guid, string>( - (Guid v) => v.ToString("D"), - (string v) => new Guid(v)))); + string (Guid v) => v.ToString("D"), + Guid (string v) => new Guid(v)))); guidToStringConverterProperty.SetSentinelFromProviderValue("00000000-0000-0000-0000-000000000000"); - guidToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty", "TestNamespace") }); var iPAddress = runtimeEntityType.AddProperty( "IPAddress", @@ -5877,20 +5781,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddress(instance) == null); iPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddress(entity) = value); iPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[95]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddress, 95), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( index: 95, originalValueIndex: 95, @@ -5899,28 +5803,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - iPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var iPAddressArray = runtimeEntityType.AddProperty( "IPAddressArray", @@ -5928,20 +5831,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("IPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); iPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressArray(instance) == null); iPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.IPAddressArray(entity) = value); iPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[96]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(iPAddressArray, 96), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(iPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( index: 96, originalValueIndex: 96, @@ -5950,53 +5853,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - iPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var iPAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "IPAddressToBytesConverterProperty", @@ -6005,20 +5907,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToBytesConverter()); iPAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(instance) == null); iPAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(entity) = value); iPAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[97]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToBytesConverterProperty, 97), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( index: 97, originalValueIndex: 97, @@ -6027,28 +5929,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 16), converter: new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)), + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<IPAddress, byte[]>( - (IPAddress v) => v.GetAddressBytes(), - (byte[] v) => new IPAddress(v)))); - iPAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty", "TestNamespace") }); + byte[] (IPAddress v) => v.GetAddressBytes(), + IPAddress (byte[] v) => new IPAddress(v)))); var iPAddressToStringConverterProperty = runtimeEntityType.AddProperty( "IPAddressToStringConverterProperty", @@ -6057,20 +5958,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IPAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new IPAddressToStringConverter()); iPAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(instance) == null); iPAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(entity) = value); iPAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[98]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IPAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(iPAddressToStringConverterProperty, 98), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( index: 98, originalValueIndex: 98, @@ -6079,28 +5980,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); iPAddressToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - iPAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var int16 = runtimeEntityType.AddProperty( "Int16", @@ -6109,20 +6009,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (short)0); int16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(instance) == 0); + short (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16(entity) == 0, + short (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16(instance) == 0); int16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short value) => ManyTypesUnsafeAccessors.Int16(entity) = value); int16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), - (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), - (ValueBuffer valueBuffer) => valueBuffer[99]); + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short (InternalEntityEntry entry) => entry.ReadOriginalValue<short>(int16, 99), + short (InternalEntityEntry entry) => entry.GetCurrentValue<short>(int16), + object (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( index: 99, originalValueIndex: 99, @@ -6131,20 +6031,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16", "TestNamespace") }); var int16Array = runtimeEntityType.AddProperty( "Int16Array", @@ -6152,20 +6051,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(instance) == null); + short[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int16Array(entity) == null, + short[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int16Array(instance) == null); int16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, short[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short[] value) => ManyTypesUnsafeAccessors.Int16Array(entity) = value); int16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), - (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[100]); + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short[] (InternalEntityEntry entry) => entry.ReadOriginalValue<short[]>(int16Array, 100), + short[] (InternalEntityEntry entry) => entry.GetCurrentValue<short[]>(int16Array), + object (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( index: 100, originalValueIndex: 100, @@ -6174,37 +6073,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<short[], short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<short[], short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<short[], short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array", "TestNamespace") }); var int32 = runtimeEntityType.AddProperty( "Int32", @@ -6213,20 +6111,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); int32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32(instance) == 0); int32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.Int32(entity) = value); int32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), - (ValueBuffer valueBuffer) => valueBuffer[101]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(int32, 101), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(int32), + object (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( index: 101, originalValueIndex: 101, @@ -6235,20 +6133,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32", "TestNamespace") }); var int32Array = runtimeEntityType.AddProperty( "Int32Array", @@ -6256,20 +6153,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(instance) == null); + int[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32Array(entity) == null, + int[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32Array(instance) == null); int32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[] value) => ManyTypesUnsafeAccessors.Int32Array(entity) = value); int32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[102]); + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[]>(int32Array, 102), + int[] (InternalEntityEntry entry) => entry.GetCurrentValue<int[]>(int32Array), + object (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( index: 102, originalValueIndex: 102, @@ -6278,37 +6175,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int>(new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array", "TestNamespace") }); var int32NestedCollection = runtimeEntityType.AddProperty( "Int32NestedCollection", @@ -6316,20 +6212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(instance) == null); + int[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) == null, + int[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int32NestedCollection(instance) == null); int32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int[][] value) => ManyTypesUnsafeAccessors.Int32NestedCollection(entity) = value); int32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), - (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[103]); + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int[][]>(int32NestedCollection, 103), + int[][] (InternalEntityEntry entry) => entry.GetCurrentValue<int[][]>(int32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[103]); int32NestedCollection.SetPropertyIndexes( index: 103, originalValueIndex: 103, @@ -6338,17 +6234,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfReferenceTypesComparer<int[][], int[]>(new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int[]>(new JsonCollectionOfReferencesReaderWriter<int[][], int[]>( new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance))), @@ -6357,37 +6253,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), keyComparer: new ListOfValueTypesComparer<int[], int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int>(new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<int[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - int32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection", "TestNamespace") }); var int64 = runtimeEntityType.AddProperty( "Int64", @@ -6396,20 +6291,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0L); int64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) == 0L, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(instance) == 0L); + long (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64(entity) == 0L, + long (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64(instance) == 0L); int64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long value) => ManyTypesUnsafeAccessors.Int64(entity) = value); int64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), - (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), - (ValueBuffer valueBuffer) => valueBuffer[104]); + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(int64, 104), + long (InternalEntityEntry entry) => entry.GetCurrentValue<long>(int64), + object (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( index: 104, originalValueIndex: 104, @@ -6418,20 +6313,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64", "TestNamespace") }); var int64Array = runtimeEntityType.AddProperty( "Int64Array", @@ -6439,20 +6333,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(instance) == null); + long[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64Array(entity) == null, + long[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64Array(instance) == null); int64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, long[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long[] value) => ManyTypesUnsafeAccessors.Int64Array(entity) = value); int64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), - (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[105]); + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long[] (InternalEntityEntry entry) => entry.ReadOriginalValue<long[]>(int64Array, 105), + long[] (InternalEntityEntry entry) => entry.GetCurrentValue<long[]>(int64Array), + object (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( index: 105, originalValueIndex: 105, @@ -6461,37 +6355,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long>(new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array", "TestNamespace") }); var int64NestedCollection = runtimeEntityType.AddProperty( "Int64NestedCollection", @@ -6499,20 +6392,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(instance) == null); + IList<long[]>[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) == null, + IList<long[]>[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int64NestedCollection(instance) == null); int64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IList<long[]>[] value) => ManyTypesUnsafeAccessors.Int64NestedCollection(entity) = value); int64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[106]); + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IList<long[]>[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<long[]>[]>(int64NestedCollection, 106), + IList<long[]>[] (InternalEntityEntry entry) => entry.GetCurrentValue<IList<long[]>[]>(int64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[106]); int64NestedCollection.SetPropertyIndexes( index: 106, originalValueIndex: 106, @@ -6521,17 +6414,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<IList<long[]>[], IList<long[]>>(new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IList<long[]>>(new JsonCollectionOfReferencesReaderWriter<IList<long[]>[], IList<long[]>>( new JsonCollectionOfReferencesReaderWriter<List<long[]>, long[]>( new JsonCollectionOfStructsReaderWriter<long[], long>( @@ -6542,17 +6435,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfReferenceTypesComparer<List<long[]>, long[]>(new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long[]>(new JsonCollectionOfReferencesReaderWriter<List<long[]>, long[]>( new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance))), @@ -6561,37 +6454,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), keyComparer: new ListOfValueTypesComparer<long[], long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long>(new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<long[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - int64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection", "TestNamespace") }); var int8 = runtimeEntityType.AddProperty( "Int8", @@ -6600,20 +6492,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (sbyte)0); int8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(instance) == 0); + sbyte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8(entity) == 0, + sbyte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8(instance) == 0); int8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte value) => ManyTypesUnsafeAccessors.Int8(entity) = value); int8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), - (ValueBuffer valueBuffer) => valueBuffer[107]); + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte>(int8, 107), + sbyte (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte>(int8), + object (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( index: 107, originalValueIndex: 107, @@ -6622,20 +6514,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - int8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8", "TestNamespace") }); var int8Array = runtimeEntityType.AddProperty( "Int8Array", @@ -6643,20 +6534,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(instance) == null); + sbyte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8Array(entity) == null, + sbyte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8Array(instance) == null); int8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[] value) => ManyTypesUnsafeAccessors.Int8Array(entity) = value); int8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[108]); + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[]>(int8Array, 108), + sbyte[] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[]>(int8Array), + object (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( index: 108, originalValueIndex: 108, @@ -6665,37 +6556,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte>(new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - int8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array", "TestNamespace") }); var int8NestedCollection = runtimeEntityType.AddProperty( "Int8NestedCollection", @@ -6703,20 +6593,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Int8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); int8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(instance) == null); + sbyte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) == null, + sbyte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Int8NestedCollection(instance) == null); int8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => ManyTypesUnsafeAccessors.Int8NestedCollection(entity) = value); int8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), - (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[109]); + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Int8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte[][][]>(int8NestedCollection, 109), + sbyte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte[][][]>(int8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[109]); int8NestedCollection.SetPropertyIndexes( index: 109, originalValueIndex: 109, @@ -6725,17 +6615,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); int8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][][], sbyte[][]>(new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte[][]>(new JsonCollectionOfReferencesReaderWriter<sbyte[][][], sbyte[][]>( new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( @@ -6746,17 +6636,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonSByteReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfReferenceTypesComparer<sbyte[][], sbyte[]>(new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte[]>(new JsonCollectionOfReferencesReaderWriter<sbyte[][], sbyte[]>( new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance))), @@ -6765,37 +6655,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonSByteReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), keyComparer: new ListOfValueTypesComparer<sbyte[], sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v)), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte>(new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<sbyte[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - int8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection", "TestNamespace") }); var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", @@ -6804,20 +6693,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToBytesConverter<int>()); intNumberToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(instance) == 0); intNumberToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(entity) = value); intNumberToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[110]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToBytesConverterProperty, 110), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( index: 110, originalValueIndex: 110, @@ -6826,29 +6715,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 4), converter: new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)), + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<int, byte[]>( - (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), - (byte[] v) => v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt(v.Length == 0 ? new byte[4] : v), 0)))); + byte[] (int v) => NumberToBytesConverter<int>.ReverseInt(BitConverter.GetBytes(v)), + int (byte[] v) => (v == null ? 0 : BitConverter.ToInt32(NumberToBytesConverter<int>.ReverseInt((v.Length == 0 ? new byte[4] : v)), 0))))); intNumberToBytesConverterProperty.SetSentinelFromProviderValue(new byte[] { 0, 0, 0, 0 }); - intNumberToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty", "TestNamespace") }); var intNumberToStringConverterProperty = runtimeEntityType.AddProperty( "IntNumberToStringConverterProperty", @@ -6857,20 +6745,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<IntNumberToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new NumberToStringConverter<int>()); intNumberToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(instance) == 0); + int (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) == 0, + int (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(instance) == 0); intNumberToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int value) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(entity) = value); intNumberToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[111]); + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.IntNumberToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(intNumberToStringConverterProperty, 111), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(intNumberToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( index: 111, originalValueIndex: 111, @@ -6879,29 +6767,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); intNumberToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int, string>( JsonStringReaderWriter.Instance, new ValueConverter<int, string>( - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v))), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture)))); intNumberToStringConverterProperty.SetSentinelFromProviderValue("0"); - intNumberToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty", "TestNamespace") }); var nullIntToNullStringConverterProperty = runtimeEntityType.AddProperty( "NullIntToNullStringConverterProperty", @@ -6911,20 +6798,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullable: true, valueConverter: new CompiledModelTestBase.NullIntToNullStringConverter()); nullIntToNullStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(instance).HasValue)); nullIntToNullStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(entity) = value); nullIntToNullStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullIntToNullStringConverterProperty, 112), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[112]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullIntToNullStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullIntToNullStringConverterProperty, 112), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullIntToNullStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( index: 112, originalValueIndex: 112, @@ -6933,28 +6820,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullIntToNullStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), keyComparer: new ValueComparer<int?>( - (Nullable<int> v1, Nullable<int> v2) => v1 == v2, - (Nullable<int> v) => (int)v, - (Nullable<int> v) => v), + bool (int? v1, int? v2) => v1 == v2, + int (int? v) => ((int)(v)), + int? (int? v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<int?, string>( JsonStringReaderWriter.Instance, new ValueConverter<int?, string>( - (Nullable<int> v) => v == null ? null : ((object)v).ToString(), - (string v) => v == null || v == "<null>" ? null : (Nullable<int>)int.Parse(v), + string (int? v) => (v == null ? null : ((object)v).ToString()), + int? (string v) => (v == null || v == "<null>" ? null : ((int? )(int.Parse(v)))), convertsNulls: true))); - nullIntToNullStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty", "TestNamespace") }); var nullableBool = runtimeEntityType.AddProperty( "NullableBool", @@ -6963,20 +6849,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBool>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBool.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(instance).HasValue); + bool? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBool(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableBool(entity).HasValue), + bool? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBool(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableBool(instance).HasValue)); nullableBool.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? value) => ManyTypesUnsafeAccessors.NullableBool(entity) = value); nullableBool.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>>(nullableBool, 113), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[113]); + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBool(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? (InternalEntityEntry entry) => entry.ReadOriginalValue<bool?>(nullableBool, 113), + bool? (InternalEntityEntry entry) => entry.GetCurrentValue<bool?>(nullableBool), + object (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( index: 113, originalValueIndex: 113, @@ -6985,22 +6871,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBool.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableBool.SetValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.Comparer)); nullableBool.SetKeyValueComparer(new NullableValueComparer<bool>(nullableBool.TypeMapping.KeyComparer)); - nullableBool.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool", "TestNamespace") }); var nullableBoolArray = runtimeEntityType.AddProperty( "NullableBoolArray", @@ -7008,20 +6893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBoolArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBoolArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBoolArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(instance) == null); + bool? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) == null, + bool? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBoolArray(instance) == null); nullableBoolArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<bool>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, bool? [] value) => ManyTypesUnsafeAccessors.NullableBoolArray(entity) = value); nullableBoolArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<bool>[]>(nullableBoolArray, 114), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBoolArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + bool? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<bool? []>(nullableBoolArray, 114), + bool? [] (InternalEntityEntry entry) => entry.GetCurrentValue<bool? []>(nullableBoolArray), + object (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( index: 114, originalValueIndex: 114, @@ -7030,37 +6915,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), keyComparer: new ListOfNullableValueTypesComparer<bool?[], bool>(new NullableValueComparer<bool>(new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v))), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<bool?>(new JsonCollectionOfNullableStructsReaderWriter<bool?[], bool>( JsonBoolReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<bool?[], bool>( JsonBoolReaderWriter.Instance), elementMapping: BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableBoolArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray", "TestNamespace") }); var nullableBytes = runtimeEntityType.AddProperty( "NullableBytes", @@ -7069,20 +6953,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytes>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableBytes.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytes(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytes(instance) == null); nullableBytes.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.NullableBytes(entity) = value); nullableBytes.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[115]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytes(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(nullableBytes, 115), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(nullableBytes), + object (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( index: 115, originalValueIndex: 115, @@ -7091,18 +6975,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytes.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - nullableBytes.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var nullableBytesArray = runtimeEntityType.AddProperty( "NullableBytesArray", @@ -7110,20 +6993,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(instance) == null); + byte[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) == null, + byte[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesArray(instance) == null); nullableBytesArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][] value) => ManyTypesUnsafeAccessors.NullableBytesArray(entity) = value); nullableBytesArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][]>(nullableBytesArray, 116), + byte[][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][]>(nullableBytesArray), + object (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( index: 116, originalValueIndex: 116, @@ -7132,35 +7015,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - nullableBytesArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var nullableBytesNestedCollection = runtimeEntityType.AddProperty( "NullableBytesNestedCollection", @@ -7168,20 +7050,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableBytesNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableBytesNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(instance) == null); + byte[][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) == null, + byte[][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(instance) == null); nullableBytesNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(entity) = value); nullableBytesNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[117]); + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableBytesNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[][][]>(nullableBytesNestedCollection, 117), + byte[][][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[117]); nullableBytesNestedCollection.SetPropertyIndexes( index: 117, originalValueIndex: 117, @@ -7190,17 +7072,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableBytesNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), keyComparer: new ListOfReferenceTypesComparer<byte[][][], byte[][]>(new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v))), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[][]>(new JsonCollectionOfReferencesReaderWriter<byte[][][], byte[][]>( new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance))), @@ -7209,35 +7091,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonByteArrayReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<byte[][], byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<byte[][], byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())))); - nullableBytesNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())))); var nullableChar = runtimeEntityType.AddProperty( "NullableChar", @@ -7246,20 +7127,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableChar>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableChar.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(instance).HasValue); + char? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableChar(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableChar(entity).HasValue), + char? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableChar(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableChar(instance).HasValue)); nullableChar.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? value) => ManyTypesUnsafeAccessors.NullableChar(entity) = value); nullableChar.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>>(nullableChar, 118), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[118]); + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableChar(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? (InternalEntityEntry entry) => entry.ReadOriginalValue<char?>(nullableChar, 118), + char? (InternalEntityEntry entry) => entry.GetCurrentValue<char?>(nullableChar), + object (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( index: 118, originalValueIndex: 118, @@ -7268,22 +7149,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableChar.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); nullableChar.SetValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.Comparer)); nullableChar.SetKeyValueComparer(new NullableValueComparer<char>(nullableChar.TypeMapping.KeyComparer)); - nullableChar.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar", "TestNamespace") }); var nullableCharArray = runtimeEntityType.AddProperty( "NullableCharArray", @@ -7291,20 +7171,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableCharArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableCharArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableCharArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(instance) == null); + char? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableCharArray(entity) == null, + char? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableCharArray(instance) == null); nullableCharArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<char>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, char? [] value) => ManyTypesUnsafeAccessors.NullableCharArray(entity) = value); nullableCharArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<char>[]>(nullableCharArray, 119), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<char>[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[119]); + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableCharArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + char? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<char? []>(nullableCharArray, 119), + char? [] (InternalEntityEntry entry) => entry.GetCurrentValue<char? []>(nullableCharArray), + object (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( index: 119, originalValueIndex: 119, @@ -7313,37 +7193,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), keyComparer: new ListOfNullableValueTypesComparer<char?[], char>(new NullableValueComparer<char>(new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v))), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<char?>(new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( JsonCharReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<char?[], char>( JsonCharReaderWriter.Instance), elementMapping: CharTypeMapping.Default.Clone( comparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), keyComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - nullableCharArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray", "TestNamespace") }); var nullableDateOnly = runtimeEntityType.AddProperty( "NullableDateOnly", @@ -7352,20 +7231,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(instance).HasValue); + DateOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateOnly(entity).HasValue), + DateOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateOnly(instance).HasValue)); nullableDateOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? value) => ManyTypesUnsafeAccessors.NullableDateOnly(entity) = value); nullableDateOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>>(nullableDateOnly, 120), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[120]); + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly?>(nullableDateOnly, 120), + DateOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly?>(nullableDateOnly), + object (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( index: 120, originalValueIndex: 120, @@ -7375,7 +7254,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnly.TypeMapping = SqliteDateOnlyTypeMapping.Default; nullableDateOnly.SetValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.Comparer)); nullableDateOnly.SetKeyValueComparer(new NullableValueComparer<DateOnly>(nullableDateOnly.TypeMapping.KeyComparer)); - nullableDateOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly", "TestNamespace") }); var nullableDateOnlyArray = runtimeEntityType.AddProperty( "NullableDateOnlyArray", @@ -7383,20 +7261,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(instance) == null); + DateOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) == null, + DateOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(instance) == null); nullableDateOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateOnly? [] value) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(entity) = value); nullableDateOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateOnly>[]>(nullableDateOnlyArray, 121), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[121]); + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateOnly? []>(nullableDateOnlyArray, 121), + DateOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( index: 121, originalValueIndex: 121, @@ -7405,23 +7283,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateOnly?[], DateOnly>(new NullableValueComparer<DateOnly>(new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v))), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateOnly?>(new JsonCollectionOfNullableStructsReaderWriter<DateOnly?[], DateOnly>( JsonDateOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<DateOnly?[], DateOnly>( JsonDateOnlyReaderWriter.Instance), elementMapping: SqliteDateOnlyTypeMapping.Default); - nullableDateOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray", "TestNamespace") }); var nullableDateTime = runtimeEntityType.AddProperty( "NullableDateTime", @@ -7430,20 +7307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTime>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDateTime.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(instance).HasValue); + DateTime? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTime(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDateTime(entity).HasValue), + DateTime? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTime(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDateTime(instance).HasValue)); nullableDateTime.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? value) => ManyTypesUnsafeAccessors.NullableDateTime(entity) = value); nullableDateTime.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>>(nullableDateTime, 122), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[122]); + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTime(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime?>(nullableDateTime, 122), + DateTime? (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime?>(nullableDateTime), + object (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( index: 122, originalValueIndex: 122, @@ -7453,7 +7330,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTime.TypeMapping = SqliteDateTimeTypeMapping.Default; nullableDateTime.SetValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.Comparer)); nullableDateTime.SetKeyValueComparer(new NullableValueComparer<DateTime>(nullableDateTime.TypeMapping.KeyComparer)); - nullableDateTime.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime", "TestNamespace") }); var nullableDateTimeArray = runtimeEntityType.AddProperty( "NullableDateTimeArray", @@ -7461,20 +7337,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDateTimeArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDateTimeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDateTimeArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(instance) == null); + DateTime? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) == null, + DateTime? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDateTimeArray(instance) == null); nullableDateTimeArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<DateTime>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, DateTime? [] value) => ManyTypesUnsafeAccessors.NullableDateTimeArray(entity) = value); nullableDateTimeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<DateTime>[]>(nullableDateTimeArray, 123), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[123]); + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDateTimeArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + DateTime? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime? []>(nullableDateTimeArray, 123), + DateTime? [] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime? []>(nullableDateTimeArray), + object (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( index: 123, originalValueIndex: 123, @@ -7483,23 +7359,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), keyComparer: new ListOfNullableValueTypesComparer<DateTime?[], DateTime>(new NullableValueComparer<DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v))), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime?>(new JsonCollectionOfNullableStructsReaderWriter<DateTime?[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<DateTime?[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - nullableDateTimeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray", "TestNamespace") }); var nullableDecimal = runtimeEntityType.AddProperty( "NullableDecimal", @@ -7508,20 +7383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimal>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDecimal.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(instance).HasValue); + decimal? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimal(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDecimal(entity).HasValue), + decimal? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimal(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDecimal(instance).HasValue)); nullableDecimal.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? value) => ManyTypesUnsafeAccessors.NullableDecimal(entity) = value); nullableDecimal.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>>(nullableDecimal, 124), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[124]); + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimal(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal?>(nullableDecimal, 124), + decimal? (InternalEntityEntry entry) => entry.GetCurrentValue<decimal?>(nullableDecimal), + object (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( index: 124, originalValueIndex: 124, @@ -7531,7 +7406,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimal.TypeMapping = SqliteDecimalTypeMapping.Default; nullableDecimal.SetValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.Comparer)); nullableDecimal.SetKeyValueComparer(new NullableValueComparer<decimal>(nullableDecimal.TypeMapping.KeyComparer)); - nullableDecimal.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal", "TestNamespace") }); var nullableDecimalArray = runtimeEntityType.AddProperty( "NullableDecimalArray", @@ -7539,20 +7413,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDecimalArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDecimalArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDecimalArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(instance) == null); + decimal? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) == null, + decimal? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDecimalArray(instance) == null); nullableDecimalArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<decimal>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, decimal? [] value) => ManyTypesUnsafeAccessors.NullableDecimalArray(entity) = value); nullableDecimalArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<decimal>[]>(nullableDecimalArray, 125), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[125]); + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDecimalArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + decimal? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<decimal? []>(nullableDecimalArray, 125), + decimal? [] (InternalEntityEntry entry) => entry.GetCurrentValue<decimal? []>(nullableDecimalArray), + object (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( index: 125, originalValueIndex: 125, @@ -7561,23 +7435,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), keyComparer: new ListOfNullableValueTypesComparer<decimal?[], decimal>(new NullableValueComparer<decimal>(new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v))), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<decimal?>(new JsonCollectionOfNullableStructsReaderWriter<decimal?[], decimal>( SqliteJsonDecimalReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<decimal?[], decimal>( SqliteJsonDecimalReaderWriter.Instance), elementMapping: SqliteDecimalTypeMapping.Default); - nullableDecimalArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray", "TestNamespace") }); var nullableDouble = runtimeEntityType.AddProperty( "NullableDouble", @@ -7586,20 +7459,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDouble>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableDouble.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(instance).HasValue); + double? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDouble(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableDouble(entity).HasValue), + double? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDouble(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableDouble(instance).HasValue)); nullableDouble.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? value) => ManyTypesUnsafeAccessors.NullableDouble(entity) = value); nullableDouble.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>>(nullableDouble, 126), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[126]); + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDouble(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? (InternalEntityEntry entry) => entry.ReadOriginalValue<double?>(nullableDouble, 126), + double? (InternalEntityEntry entry) => entry.GetCurrentValue<double?>(nullableDouble), + object (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( index: 126, originalValueIndex: 126, @@ -7608,22 +7481,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDouble.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); nullableDouble.SetValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.Comparer)); nullableDouble.SetKeyValueComparer(new NullableValueComparer<double>(nullableDouble.TypeMapping.KeyComparer)); - nullableDouble.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble", "TestNamespace") }); var nullableDoubleArray = runtimeEntityType.AddProperty( "NullableDoubleArray", @@ -7631,20 +7503,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableDoubleArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableDoubleArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableDoubleArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(instance) == null); + double? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) == null, + double? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableDoubleArray(instance) == null); nullableDoubleArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<double>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, double? [] value) => ManyTypesUnsafeAccessors.NullableDoubleArray(entity) = value); nullableDoubleArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<double>[]>(nullableDoubleArray, 127), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[127]); + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableDoubleArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + double? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<double? []>(nullableDoubleArray, 127), + double? [] (InternalEntityEntry entry) => entry.GetCurrentValue<double? []>(nullableDoubleArray), + object (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( index: 127, originalValueIndex: 127, @@ -7653,37 +7525,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), keyComparer: new ListOfNullableValueTypesComparer<double?[], double>(new NullableValueComparer<double>(new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v))), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<double?>(new JsonCollectionOfNullableStructsReaderWriter<double?[], double>( JsonDoubleReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<double?[], double>( JsonDoubleReaderWriter.Instance), elementMapping: DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), keyComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - nullableDoubleArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray", "TestNamespace") }); var nullableEnum16 = runtimeEntityType.AddProperty( "NullableEnum16", @@ -7692,20 +7563,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16(instance).HasValue)); nullableEnum16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16, 128), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[128]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16, 128), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16), + object (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( index: 128, originalValueIndex: 128, @@ -7714,30 +7585,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.Comparer)); nullableEnum16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16.TypeMapping.KeyComparer)); - nullableEnum16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16", "TestNamespace") }); var nullableEnum16Array = runtimeEntityType.AddProperty( "NullableEnum16Array", @@ -7745,20 +7615,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Array(instance) == null); nullableEnum16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16Array(entity) = value); nullableEnum16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array, 129), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[129]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array, 129), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array), + object (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( index: 129, originalValueIndex: 129, @@ -7767,53 +7637,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16AsString = runtimeEntityType.AddProperty( "NullableEnum16AsString", @@ -7822,20 +7691,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(instance).HasValue); + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(entity).HasValue), + CompiledModelTestBase.Enum16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum16AsString(instance).HasValue)); nullableEnum16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum16>)(CompiledModelTestBase.Enum16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? value) => ManyTypesUnsafeAccessors.NullableEnum16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum16? )(((CompiledModelTestBase.Enum16)(value)))))); nullableEnum16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString, 130), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[130]); + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString, 130), + CompiledModelTestBase.Enum16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( index: 130, originalValueIndex: 130, @@ -7844,30 +7713,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsString.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))); nullableEnum16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.Comparer)); nullableEnum16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum16>(nullableEnum16AsString.TypeMapping.KeyComparer)); - nullableEnum16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString", "TestNamespace") }); var nullableEnum16AsStringArray = runtimeEntityType.AddProperty( "NullableEnum16AsStringArray", @@ -7875,20 +7743,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(instance) == null); + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) == null, + CompiledModelTestBase.Enum16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(instance) == null); nullableEnum16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum16? [] value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(entity) = value); nullableEnum16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray, 131), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[131]); + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray, 131), + CompiledModelTestBase.Enum16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( index: 131, originalValueIndex: 131, @@ -7897,53 +7765,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum16?[], CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum16AsStringCollection", @@ -7951,20 +7818,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(instance) == null); nullableEnum16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(entity) = value); nullableEnum16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection, 132), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[132]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection, 132), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( index: 132, originalValueIndex: 132, @@ -7973,53 +7840,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum16Collection = runtimeEntityType.AddProperty( "NullableEnum16Collection", @@ -8027,20 +7893,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(instance) == null); + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) == null, + List<CompiledModelTestBase.Enum16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum16Collection(instance) == null); nullableEnum16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum16?> value) => ManyTypesUnsafeAccessors.NullableEnum16Collection(entity) = value); nullableEnum16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection, 133), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection, 133), + List<CompiledModelTestBase.Enum16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( index: 133, originalValueIndex: 133, @@ -8049,53 +7915,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>(new NullableValueComparer<CompiledModelTestBase.Enum16>(new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v))), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value))), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))))), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum16>( - (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum16 v) => v), + bool (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum16 (CompiledModelTestBase.Enum16 v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value), + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum16, short>( JsonInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum16, short>( - (CompiledModelTestBase.Enum16 value) => (short)value, - (short value) => (CompiledModelTestBase.Enum16)value)))); - nullableEnum16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection", "TestNamespace") }); + short (CompiledModelTestBase.Enum16 value) => ((short)(value)), + CompiledModelTestBase.Enum16 (short value) => ((CompiledModelTestBase.Enum16)(value)))))); var nullableEnum32 = runtimeEntityType.AddProperty( "NullableEnum32", @@ -8104,20 +7969,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32(instance).HasValue)); nullableEnum32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32, 134), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[134]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32, 134), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32), + object (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( index: 134, originalValueIndex: 134, @@ -8126,30 +7991,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.Comparer)); nullableEnum32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32.TypeMapping.KeyComparer)); - nullableEnum32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32", "TestNamespace") }); var nullableEnum32Array = runtimeEntityType.AddProperty( "NullableEnum32Array", @@ -8157,20 +8021,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Array(instance) == null); nullableEnum32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32Array(entity) = value); nullableEnum32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array, 135), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[135]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array, 135), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array), + object (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( index: 135, originalValueIndex: 135, @@ -8179,53 +8043,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32AsString = runtimeEntityType.AddProperty( "NullableEnum32AsString", @@ -8234,20 +8097,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(instance).HasValue); + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(entity).HasValue), + CompiledModelTestBase.Enum32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum32AsString(instance).HasValue)); nullableEnum32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum32>)(CompiledModelTestBase.Enum32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? value) => ManyTypesUnsafeAccessors.NullableEnum32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum32? )(((CompiledModelTestBase.Enum32)(value)))))); nullableEnum32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString, 136), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[136]); + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString, 136), + CompiledModelTestBase.Enum32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( index: 136, originalValueIndex: 136, @@ -8256,30 +8119,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsString.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))); nullableEnum32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.Comparer)); nullableEnum32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum32>(nullableEnum32AsString.TypeMapping.KeyComparer)); - nullableEnum32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString", "TestNamespace") }); var nullableEnum32AsStringArray = runtimeEntityType.AddProperty( "NullableEnum32AsStringArray", @@ -8287,20 +8149,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(instance) == null); + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) == null, + CompiledModelTestBase.Enum32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(instance) == null); nullableEnum32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [] value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(entity) = value); nullableEnum32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray, 137), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[137]); + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray, 137), + CompiledModelTestBase.Enum32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( index: 137, originalValueIndex: 137, @@ -8309,53 +8171,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum32AsStringCollection", @@ -8363,20 +8224,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(instance) == null); nullableEnum32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(entity) = value); nullableEnum32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection, 138), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[138]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection, 138), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( index: 138, originalValueIndex: 138, @@ -8385,53 +8246,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32Collection = runtimeEntityType.AddProperty( "NullableEnum32Collection", @@ -8439,20 +8299,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(instance) == null); + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) == null, + List<CompiledModelTestBase.Enum32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32Collection(instance) == null); nullableEnum32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum32?> value) => ManyTypesUnsafeAccessors.NullableEnum32Collection(entity) = value); nullableEnum32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection, 139), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection, 139), + List<CompiledModelTestBase.Enum32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( index: 139, originalValueIndex: 139, @@ -8461,53 +8321,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))); - nullableEnum32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))); var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( "NullableEnum32NestedCollection", @@ -8515,20 +8374,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(instance) == null); + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) == null, + CompiledModelTestBase.Enum32? [][][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(instance) == null); nullableEnum32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum32>[][][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum32? [][][] value) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(entity) = value); nullableEnum32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection, 140), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection, 140), + CompiledModelTestBase.Enum32? [][][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[140]); nullableEnum32NestedCollection.SetPropertyIndexes( index: 140, originalValueIndex: 140, @@ -8537,109 +8396,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>(new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?[][]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][][], CompiledModelTestBase.Enum32?[][]>( new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v)))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum32?[][], CompiledModelTestBase.Enum32?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>(new NullableValueComparer<CompiledModelTestBase.Enum32>(new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v))), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum32?[], CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value))), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))))), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum32>( - (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum32 v) => v), + bool (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum32 (CompiledModelTestBase.Enum32 v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value), + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum32, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum32, int>( - (CompiledModelTestBase.Enum32 value) => (int)value, - (int value) => (CompiledModelTestBase.Enum32)value)))))); - nullableEnum32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection", "TestNamespace") }); + int (CompiledModelTestBase.Enum32 value) => ((int)(value)), + CompiledModelTestBase.Enum32 (int value) => ((CompiledModelTestBase.Enum32)(value)))))))); var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", @@ -8648,20 +8506,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64(instance).HasValue)); nullableEnum64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64, 141), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[141]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64, 141), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64), + object (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( index: 141, originalValueIndex: 141, @@ -8670,30 +8528,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.Comparer)); nullableEnum64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64.TypeMapping.KeyComparer)); - nullableEnum64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64", "TestNamespace") }); var nullableEnum64Array = runtimeEntityType.AddProperty( "NullableEnum64Array", @@ -8701,20 +8558,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Array(instance) == null); nullableEnum64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64Array(entity) = value); nullableEnum64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array, 142), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array, 142), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array), + object (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( index: 142, originalValueIndex: 142, @@ -8723,53 +8580,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64AsString = runtimeEntityType.AddProperty( "NullableEnum64AsString", @@ -8778,20 +8634,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(instance).HasValue); + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(entity).HasValue), + CompiledModelTestBase.Enum64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum64AsString(instance).HasValue)); nullableEnum64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum64>)(CompiledModelTestBase.Enum64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? value) => ManyTypesUnsafeAccessors.NullableEnum64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum64? )(((CompiledModelTestBase.Enum64)(value)))))); nullableEnum64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString, 143), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString, 143), + CompiledModelTestBase.Enum64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( index: 143, originalValueIndex: 143, @@ -8800,30 +8656,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsString.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))); nullableEnum64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.Comparer)); nullableEnum64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum64>(nullableEnum64AsString.TypeMapping.KeyComparer)); - nullableEnum64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString", "TestNamespace") }); var nullableEnum64AsStringArray = runtimeEntityType.AddProperty( "NullableEnum64AsStringArray", @@ -8831,20 +8686,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(instance) == null); + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) == null, + CompiledModelTestBase.Enum64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(instance) == null); nullableEnum64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum64? [] value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(entity) = value); nullableEnum64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray, 144), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray, 144), + CompiledModelTestBase.Enum64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( index: 144, originalValueIndex: 144, @@ -8853,53 +8708,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum64?[], CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum64AsStringCollection", @@ -8907,20 +8761,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(instance) == null); nullableEnum64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(entity) = value); nullableEnum64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection, 145), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection, 145), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( index: 145, originalValueIndex: 145, @@ -8929,53 +8783,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum64Collection = runtimeEntityType.AddProperty( "NullableEnum64Collection", @@ -8983,20 +8836,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(instance) == null); + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) == null, + List<CompiledModelTestBase.Enum64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum64Collection(instance) == null); nullableEnum64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum64?> value) => ManyTypesUnsafeAccessors.NullableEnum64Collection(entity) = value); nullableEnum64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection, 146), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection, 146), + List<CompiledModelTestBase.Enum64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( index: 146, originalValueIndex: 146, @@ -9005,53 +8858,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>(new NullableValueComparer<CompiledModelTestBase.Enum64>(new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v))), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value))), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))))), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum64>( - (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum64 v) => v), + bool (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum64 (CompiledModelTestBase.Enum64 v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value), + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum64, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum64, long>( - (CompiledModelTestBase.Enum64 value) => (long)value, - (long value) => (CompiledModelTestBase.Enum64)value)))); - nullableEnum64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection", "TestNamespace") }); + long (CompiledModelTestBase.Enum64 value) => ((long)(value)), + CompiledModelTestBase.Enum64 (long value) => ((CompiledModelTestBase.Enum64)(value)))))); var nullableEnum8 = runtimeEntityType.AddProperty( "NullableEnum8", @@ -9060,20 +8912,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8(instance).HasValue)); nullableEnum8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8, 147), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[147]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8, 147), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8), + object (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( index: 147, originalValueIndex: 147, @@ -9082,30 +8934,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.Comparer)); nullableEnum8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8.TypeMapping.KeyComparer)); - nullableEnum8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8", "TestNamespace") }); var nullableEnum8Array = runtimeEntityType.AddProperty( "NullableEnum8Array", @@ -9113,20 +8964,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Array(instance) == null); nullableEnum8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8Array(entity) = value); nullableEnum8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array, 148), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array, 148), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array), + object (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( index: 148, originalValueIndex: 148, @@ -9135,53 +8986,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8AsString = runtimeEntityType.AddProperty( "NullableEnum8AsString", @@ -9190,20 +9040,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnum8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(instance).HasValue); + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(entity).HasValue), + CompiledModelTestBase.Enum8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnum8AsString(instance).HasValue)); nullableEnum8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.Enum8>)(CompiledModelTestBase.Enum8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? value) => ManyTypesUnsafeAccessors.NullableEnum8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.Enum8? )(((CompiledModelTestBase.Enum8)(value)))))); nullableEnum8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString, 149), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString, 149), + CompiledModelTestBase.Enum8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( index: 149, originalValueIndex: 149, @@ -9212,30 +9062,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsString.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))); nullableEnum8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.Comparer)); nullableEnum8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.Enum8>(nullableEnum8AsString.TypeMapping.KeyComparer)); - nullableEnum8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString", "TestNamespace") }); var nullableEnum8AsStringArray = runtimeEntityType.AddProperty( "NullableEnum8AsStringArray", @@ -9243,20 +9092,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(instance) == null); + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) == null, + CompiledModelTestBase.Enum8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(instance) == null); nullableEnum8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [] value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(entity) = value); nullableEnum8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray, 150), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray, 150), + CompiledModelTestBase.Enum8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( index: 150, originalValueIndex: 150, @@ -9265,53 +9114,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnum8AsStringCollection", @@ -9319,20 +9167,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(instance) == null); nullableEnum8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(entity) = value); nullableEnum8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection, 151), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection, 151), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( index: 151, originalValueIndex: 151, @@ -9341,53 +9189,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8Collection = runtimeEntityType.AddProperty( "NullableEnum8Collection", @@ -9395,20 +9242,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(instance) == null); + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) == null, + List<CompiledModelTestBase.Enum8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8Collection(instance) == null); nullableEnum8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.Enum8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.Enum8?> value) => ManyTypesUnsafeAccessors.NullableEnum8Collection(entity) = value); nullableEnum8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection, 152), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection, 152), + List<CompiledModelTestBase.Enum8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( index: 152, originalValueIndex: 152, @@ -9417,53 +9264,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))); - nullableEnum8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))); var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( "NullableEnum8NestedCollection", @@ -9471,20 +9317,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnum8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnum8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(instance) == null); + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) == null, + CompiledModelTestBase.Enum8? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(instance) == null); nullableEnum8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.Enum8>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8? [][] value) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(entity) = value); nullableEnum8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection, 153), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[153]); + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnum8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection, 153), + CompiledModelTestBase.Enum8? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[153]); nullableEnum8NestedCollection.SetPropertyIndexes( index: 153, originalValueIndex: 153, @@ -9493,80 +9339,79 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnum8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v)))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.Enum8?[][], CompiledModelTestBase.Enum8?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>(new NullableValueComparer<CompiledModelTestBase.Enum8>(new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v))), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.Enum8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value)))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.Enum8?[], CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.Enum8>( - (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.Enum8 v) => v), + bool (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.Enum8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.Enum8 (CompiledModelTestBase.Enum8 v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value), + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.Enum8, sbyte>( JsonSByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.Enum8, sbyte>( - (CompiledModelTestBase.Enum8 value) => (sbyte)value, - (sbyte value) => (CompiledModelTestBase.Enum8)value))))); - nullableEnum8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection", "TestNamespace") }); + sbyte (CompiledModelTestBase.Enum8 value) => ((sbyte)(value)), + CompiledModelTestBase.Enum8 (sbyte value) => ((CompiledModelTestBase.Enum8)(value))))))); var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", @@ -9575,20 +9420,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16(instance).HasValue)); nullableEnumU16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16, 154), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[154]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16, 154), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16), + object (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( index: 154, originalValueIndex: 154, @@ -9597,30 +9442,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.Comparer)); nullableEnumU16.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16.TypeMapping.KeyComparer)); - nullableEnumU16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16", "TestNamespace") }); var nullableEnumU16Array = runtimeEntityType.AddProperty( "NullableEnumU16Array", @@ -9628,20 +9472,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Array(instance) == null); nullableEnumU16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16Array(entity) = value); nullableEnumU16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array, 155), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[155]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array, 155), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array), + object (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( index: 155, originalValueIndex: 155, @@ -9650,53 +9494,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16AsString = runtimeEntityType.AddProperty( "NullableEnumU16AsString", @@ -9705,20 +9548,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU16AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(instance).HasValue); + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity).HasValue), + CompiledModelTestBase.EnumU16? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU16AsString(instance).HasValue)); nullableEnumU16AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU16>)(CompiledModelTestBase.EnumU16)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? value) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU16? )(((CompiledModelTestBase.EnumU16)(value)))))); nullableEnumU16AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString, 156), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[156]); + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString, 156), + CompiledModelTestBase.EnumU16? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString), + object (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( index: 156, originalValueIndex: 156, @@ -9727,30 +9570,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsString.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))); nullableEnumU16AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.Comparer)); nullableEnumU16AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU16>(nullableEnumU16AsString.TypeMapping.KeyComparer)); - nullableEnumU16AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString", "TestNamespace") }); var nullableEnumU16AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU16AsStringArray", @@ -9758,20 +9600,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(instance) == null); + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) == null, + CompiledModelTestBase.EnumU16? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(instance) == null); nullableEnumU16AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU16>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU16? [] value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(entity) = value); nullableEnumU16AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray, 157), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[157]); + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray, 157), + CompiledModelTestBase.EnumU16? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( index: 157, originalValueIndex: 157, @@ -9780,53 +9622,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU16?[], CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU16AsStringCollection", @@ -9834,20 +9675,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(instance) == null); nullableEnumU16AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(entity) = value); nullableEnumU16AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection, 158), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection, 158), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( index: 158, originalValueIndex: 158, @@ -9856,53 +9697,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU16Collection = runtimeEntityType.AddProperty( "NullableEnumU16Collection", @@ -9910,20 +9750,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU16Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU16Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU16Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(instance) == null); + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) == null, + List<CompiledModelTestBase.EnumU16?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(instance) == null); nullableEnumU16Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU16>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU16?> value) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(entity) = value); nullableEnumU16Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection, 159), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[159]); + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU16Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection, 159), + List<CompiledModelTestBase.EnumU16?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection), + object (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( index: 159, originalValueIndex: 159, @@ -9932,53 +9772,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>(new NullableValueComparer<CompiledModelTestBase.EnumU16>(new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v))), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU16?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value))), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))))), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU16>( - (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU16 v) => v), + bool (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU16 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU16 (CompiledModelTestBase.EnumU16 v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value), + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU16, ushort>( JsonUInt16ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU16, ushort>( - (CompiledModelTestBase.EnumU16 value) => (ushort)value, - (ushort value) => (CompiledModelTestBase.EnumU16)value)))); - nullableEnumU16Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection", "TestNamespace") }); + ushort (CompiledModelTestBase.EnumU16 value) => ((ushort)(value)), + CompiledModelTestBase.EnumU16 (ushort value) => ((CompiledModelTestBase.EnumU16)(value)))))); var nullableEnumU32 = runtimeEntityType.AddProperty( "NullableEnumU32", @@ -9987,20 +9826,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32(instance).HasValue)); nullableEnumU32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32, 160), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[160]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32, 160), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32), + object (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( index: 160, originalValueIndex: 160, @@ -10009,30 +9848,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.Comparer)); nullableEnumU32.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32.TypeMapping.KeyComparer)); - nullableEnumU32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32", "TestNamespace") }); var nullableEnumU32Array = runtimeEntityType.AddProperty( "NullableEnumU32Array", @@ -10040,20 +9878,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Array(instance) == null); nullableEnumU32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32Array(entity) = value); nullableEnumU32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array, 161), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[161]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array, 161), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array), + object (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( index: 161, originalValueIndex: 161, @@ -10062,53 +9900,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32AsString = runtimeEntityType.AddProperty( "NullableEnumU32AsString", @@ -10117,20 +9954,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU32AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(instance).HasValue); + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity).HasValue), + CompiledModelTestBase.EnumU32? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU32AsString(instance).HasValue)); nullableEnumU32AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU32>)(CompiledModelTestBase.EnumU32)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? value) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU32? )(((CompiledModelTestBase.EnumU32)(value)))))); nullableEnumU32AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString, 162), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[162]); + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString, 162), + CompiledModelTestBase.EnumU32? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString), + object (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( index: 162, originalValueIndex: 162, @@ -10139,30 +9976,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsString.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))); nullableEnumU32AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.Comparer)); nullableEnumU32AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU32>(nullableEnumU32AsString.TypeMapping.KeyComparer)); - nullableEnumU32AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString", "TestNamespace") }); var nullableEnumU32AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU32AsStringArray", @@ -10170,20 +10006,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(instance) == null); + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) == null, + CompiledModelTestBase.EnumU32? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(instance) == null); nullableEnumU32AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU32>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU32? [] value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(entity) = value); nullableEnumU32AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray, 163), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[163]); + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray, 163), + CompiledModelTestBase.EnumU32? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( index: 163, originalValueIndex: 163, @@ -10192,53 +10028,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU32?[], CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU32AsStringCollection", @@ -10246,20 +10081,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(instance) == null); nullableEnumU32AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(entity) = value); nullableEnumU32AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection, 164), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection, 164), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( index: 164, originalValueIndex: 164, @@ -10268,53 +10103,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU32Collection = runtimeEntityType.AddProperty( "NullableEnumU32Collection", @@ -10322,20 +10156,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU32Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU32Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU32Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(instance) == null); + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) == null, + List<CompiledModelTestBase.EnumU32?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(instance) == null); nullableEnumU32Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU32>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU32?> value) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(entity) = value); nullableEnumU32Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection, 165), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[165]); + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU32Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection, 165), + List<CompiledModelTestBase.EnumU32?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection), + object (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( index: 165, originalValueIndex: 165, @@ -10344,53 +10178,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>(new NullableValueComparer<CompiledModelTestBase.EnumU32>(new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v))), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU32?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value))), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))))), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU32>( - (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU32 v) => v), + bool (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU32 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU32 (CompiledModelTestBase.EnumU32 v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value), + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU32, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU32, uint>( - (CompiledModelTestBase.EnumU32 value) => (uint)value, - (uint value) => (CompiledModelTestBase.EnumU32)value)))); - nullableEnumU32Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection", "TestNamespace") }); + uint (CompiledModelTestBase.EnumU32 value) => ((uint)(value)), + CompiledModelTestBase.EnumU32 (uint value) => ((CompiledModelTestBase.EnumU32)(value)))))); var nullableEnumU64 = runtimeEntityType.AddProperty( "NullableEnumU64", @@ -10399,20 +10232,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64(instance).HasValue)); nullableEnumU64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64, 166), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[166]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64, 166), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64), + object (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( index: 166, originalValueIndex: 166, @@ -10421,28 +10254,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); nullableEnumU64.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.Comparer)); nullableEnumU64.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64.TypeMapping.KeyComparer)); - nullableEnumU64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64", "TestNamespace") }); var nullableEnumU64Array = runtimeEntityType.AddProperty( "NullableEnumU64Array", @@ -10450,20 +10282,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Array(instance) == null); nullableEnumU64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64Array(entity) = value); nullableEnumU64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array, 167), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[167]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array, 167), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array), + object (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( index: 167, originalValueIndex: 167, @@ -10472,51 +10304,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64AsString = runtimeEntityType.AddProperty( "NullableEnumU64AsString", @@ -10525,20 +10356,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU64AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(instance).HasValue); + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity).HasValue), + CompiledModelTestBase.EnumU64? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU64AsString(instance).HasValue)); nullableEnumU64AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU64>)(CompiledModelTestBase.EnumU64)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? value) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU64? )(((CompiledModelTestBase.EnumU64)(value)))))); nullableEnumU64AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString, 168), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[168]); + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString, 168), + CompiledModelTestBase.EnumU64? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString), + object (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( index: 168, originalValueIndex: 168, @@ -10547,28 +10378,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsString.TypeMapping = SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))); nullableEnumU64AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.Comparer)); nullableEnumU64AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU64>(nullableEnumU64AsString.TypeMapping.KeyComparer)); - nullableEnumU64AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString", "TestNamespace") }); var nullableEnumU64AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU64AsStringArray", @@ -10576,20 +10406,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(instance) == null); + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) == null, + CompiledModelTestBase.EnumU64? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(instance) == null); nullableEnumU64AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [] value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(entity) = value); nullableEnumU64AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray, 169), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[169]); + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray, 169), + CompiledModelTestBase.EnumU64? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( index: 169, originalValueIndex: 169, @@ -10598,51 +10428,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU64AsStringCollection", @@ -10650,20 +10479,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(instance) == null); nullableEnumU64AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(entity) = value); nullableEnumU64AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection, 170), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[170]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection, 170), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( index: 170, originalValueIndex: 170, @@ -10672,51 +10501,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64Collection = runtimeEntityType.AddProperty( "NullableEnumU64Collection", @@ -10724,20 +10552,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(instance) == null); + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) == null, + List<CompiledModelTestBase.EnumU64?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(instance) == null); nullableEnumU64Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU64>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU64?> value) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(entity) = value); nullableEnumU64Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection, 171), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[171]); + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection, 171), + List<CompiledModelTestBase.EnumU64?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection), + object (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( index: 171, originalValueIndex: 171, @@ -10746,51 +10574,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))); - nullableEnumU64Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))); var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( "NullableEnumU64NestedCollection", @@ -10798,20 +10625,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(instance) == null); + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) == null, + CompiledModelTestBase.EnumU64? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(instance) == null); nullableEnumU64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU64>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64? [][] value) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(entity) = value); nullableEnumU64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection, 172), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[172]); + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection, 172), + CompiledModelTestBase.EnumU64? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[172]); nullableEnumU64NestedCollection.SetPropertyIndexes( index: 172, originalValueIndex: 172, @@ -10820,78 +10647,77 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), keyComparer: new ListOfReferenceTypesComparer<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>(new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v)))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?[]>(new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<CompiledModelTestBase.EnumU64?[][], CompiledModelTestBase.EnumU64?[]>( new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>(new NullableValueComparer<CompiledModelTestBase.EnumU64>(new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v))), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU64?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value)))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU64?[], CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))), elementMapping: SqliteULongTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU64>( - (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU64 v) => v), + bool (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU64 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU64 (CompiledModelTestBase.EnumU64 v) => v), providerValueComparer: new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v), converter: new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value), + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU64, ulong>( JsonUInt64ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU64, ulong>( - (CompiledModelTestBase.EnumU64 value) => (ulong)value, - (ulong value) => (CompiledModelTestBase.EnumU64)value))))); - nullableEnumU64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection", "TestNamespace") }); + ulong (CompiledModelTestBase.EnumU64 value) => ((ulong)(value)), + CompiledModelTestBase.EnumU64 (ulong value) => ((CompiledModelTestBase.EnumU64)(value))))))); var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", @@ -10900,20 +10726,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8(instance).HasValue)); nullableEnumU8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8, 173), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[173]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8, 173), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8), + object (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( index: 173, originalValueIndex: 173, @@ -10922,30 +10748,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.Comparer)); nullableEnumU8.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8.TypeMapping.KeyComparer)); - nullableEnumU8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8", "TestNamespace") }); var nullableEnumU8Array = runtimeEntityType.AddProperty( "NullableEnumU8Array", @@ -10953,20 +10778,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Array(instance) == null); nullableEnumU8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8Array(entity) = value); nullableEnumU8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array, 174), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array, 174), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array), + object (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( index: 174, originalValueIndex: 174, @@ -10975,53 +10800,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8AsString = runtimeEntityType.AddProperty( "NullableEnumU8AsString", @@ -11030,20 +10854,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableEnumU8AsString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(instance).HasValue); + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity).HasValue), + CompiledModelTestBase.EnumU8? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableEnumU8AsString(instance).HasValue)); nullableEnumU8AsString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(entity) = value == null ? value : (Nullable<CompiledModelTestBase.EnumU8>)(CompiledModelTestBase.EnumU8)value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? value) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(entity) = (value == null ? value : ((CompiledModelTestBase.EnumU8? )(((CompiledModelTestBase.EnumU8)(value)))))); nullableEnumU8AsString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString, 175), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[175]); + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString, 175), + CompiledModelTestBase.EnumU8? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString), + object (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( index: 175, originalValueIndex: 175, @@ -11052,30 +10876,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsString.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))); nullableEnumU8AsString.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.Comparer)); nullableEnumU8AsString.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.EnumU8>(nullableEnumU8AsString.TypeMapping.KeyComparer)); - nullableEnumU8AsString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString", "TestNamespace") }); var nullableEnumU8AsStringArray = runtimeEntityType.AddProperty( "NullableEnumU8AsStringArray", @@ -11083,20 +10906,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(instance) == null); + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) == null, + CompiledModelTestBase.EnumU8? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(instance) == null); nullableEnumU8AsStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<CompiledModelTestBase.EnumU8>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU8? [] value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(entity) = value); nullableEnumU8AsStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray, 176), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[176]); + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray, 176), + CompiledModelTestBase.EnumU8? [] (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( index: 176, originalValueIndex: 176, @@ -11105,53 +10928,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<CompiledModelTestBase.EnumU8?[], CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8AsStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8AsStringCollection = runtimeEntityType.AddProperty( "NullableEnumU8AsStringCollection", @@ -11159,20 +10981,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8AsStringCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8AsStringCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8AsStringCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(instance) == null); nullableEnumU8AsStringCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(entity) = value); nullableEnumU8AsStringCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection, 177), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[177]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8AsStringCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection, 177), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection), + object (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( index: 177, originalValueIndex: 177, @@ -11181,53 +11003,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8AsStringCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableEnumU8Collection = runtimeEntityType.AddProperty( "NullableEnumU8Collection", @@ -11235,20 +11056,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU8Collection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableEnumU8Collection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableEnumU8Collection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(instance) == null); + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) == null, + List<CompiledModelTestBase.EnumU8?> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(instance) == null); nullableEnumU8Collection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<CompiledModelTestBase.EnumU8>> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<CompiledModelTestBase.EnumU8?> value) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(entity) = value); nullableEnumU8Collection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection, 178), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[178]); + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableEnumU8Collection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection, 178), + List<CompiledModelTestBase.EnumU8?> (InternalEntityEntry entry) => entry.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection), + object (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( index: 178, originalValueIndex: 178, @@ -11257,53 +11078,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), keyComparer: new ListOfNullableValueTypesComparer<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>(new NullableValueComparer<CompiledModelTestBase.EnumU8>(new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v))), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<CompiledModelTestBase.EnumU8?>(new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<List<CompiledModelTestBase.EnumU8?>, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value))), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))))), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.EnumU8>( - (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.EnumU8 v) => v), + bool (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.EnumU8 v) => ((object)v).GetHashCode(), + CompiledModelTestBase.EnumU8 (CompiledModelTestBase.EnumU8 v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value), + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.EnumU8, byte>( JsonByteReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.EnumU8, byte>( - (CompiledModelTestBase.EnumU8 value) => (byte)value, - (byte value) => (CompiledModelTestBase.EnumU8)value)))); - nullableEnumU8Collection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection", "TestNamespace") }); + byte (CompiledModelTestBase.EnumU8 value) => ((byte)(value)), + CompiledModelTestBase.EnumU8 (byte value) => ((CompiledModelTestBase.EnumU8)(value)))))); var nullableFloat = runtimeEntityType.AddProperty( "NullableFloat", @@ -11312,20 +11132,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloat>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableFloat.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(instance).HasValue); + float? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloat(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableFloat(entity).HasValue), + float? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloat(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableFloat(instance).HasValue)); nullableFloat.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? value) => ManyTypesUnsafeAccessors.NullableFloat(entity) = value); nullableFloat.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>>(nullableFloat, 179), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[179]); + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloat(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? (InternalEntityEntry entry) => entry.ReadOriginalValue<float?>(nullableFloat, 179), + float? (InternalEntityEntry entry) => entry.GetCurrentValue<float?>(nullableFloat), + object (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( index: 179, originalValueIndex: 179, @@ -11334,22 +11154,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloat.TypeMapping = FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL")); nullableFloat.SetValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.Comparer)); nullableFloat.SetKeyValueComparer(new NullableValueComparer<float>(nullableFloat.TypeMapping.KeyComparer)); - nullableFloat.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat", "TestNamespace") }); var nullableFloatArray = runtimeEntityType.AddProperty( "NullableFloatArray", @@ -11357,20 +11176,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableFloatArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableFloatArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableFloatArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(instance) == null); + float? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) == null, + float? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableFloatArray(instance) == null); nullableFloatArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<float>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, float? [] value) => ManyTypesUnsafeAccessors.NullableFloatArray(entity) = value); nullableFloatArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<float>[]>(nullableFloatArray, 180), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<float>[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableFloatArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + float? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<float? []>(nullableFloatArray, 180), + float? [] (InternalEntityEntry entry) => entry.GetCurrentValue<float? []>(nullableFloatArray), + object (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( index: 180, originalValueIndex: 180, @@ -11379,37 +11198,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), keyComparer: new ListOfNullableValueTypesComparer<float?[], float>(new NullableValueComparer<float>(new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v))), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<float?>(new JsonCollectionOfNullableStructsReaderWriter<float?[], float>( JsonFloatReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<float?[], float>( JsonFloatReaderWriter.Instance), elementMapping: FloatTypeMapping.Default.Clone( comparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), keyComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), providerValueComparer: new ValueComparer<float>( - (float v1, float v2) => v1.Equals(v2), - (float v) => ((object)v).GetHashCode(), - (float v) => v), + bool (float v1, float v2) => v1.Equals(v2), + int (float v) => ((object)v).GetHashCode(), + float (float v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL"))); - nullableFloatArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray", "TestNamespace") }); var nullableGuid = runtimeEntityType.AddProperty( "NullableGuid", @@ -11418,20 +11236,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuid>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableGuid.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(instance).HasValue); + Guid? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuid(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableGuid(entity).HasValue), + Guid? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuid(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableGuid(instance).HasValue)); nullableGuid.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? value) => ManyTypesUnsafeAccessors.NullableGuid(entity) = value); nullableGuid.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>>(nullableGuid, 181), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[181]); + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuid(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid?>(nullableGuid, 181), + Guid? (InternalEntityEntry entry) => entry.GetCurrentValue<Guid?>(nullableGuid), + object (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( index: 181, originalValueIndex: 181, @@ -11441,7 +11259,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuid.TypeMapping = SqliteGuidTypeMapping.Default; nullableGuid.SetValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.Comparer)); nullableGuid.SetKeyValueComparer(new NullableValueComparer<Guid>(nullableGuid.TypeMapping.KeyComparer)); - nullableGuid.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid", "TestNamespace") }); var nullableGuidArray = runtimeEntityType.AddProperty( "NullableGuidArray", @@ -11449,20 +11266,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(instance) == null); + Guid? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) == null, + Guid? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidArray(instance) == null); nullableGuidArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [] value) => ManyTypesUnsafeAccessors.NullableGuidArray(entity) = value); nullableGuidArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[]>(nullableGuidArray, 182), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? []>(nullableGuidArray, 182), + Guid? [] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? []>(nullableGuidArray), + object (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( index: 182, originalValueIndex: 182, @@ -11471,23 +11288,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?>(new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default); - nullableGuidArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray", "TestNamespace") }); var nullableGuidNestedCollection = runtimeEntityType.AddProperty( "NullableGuidNestedCollection", @@ -11495,20 +11311,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableGuidNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableGuidNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(instance) == null); + Guid? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) == null, + Guid? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(instance) == null); nullableGuidNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<Guid>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Guid? [][] value) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(entity) = value); nullableGuidNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<Guid>[][]>(nullableGuidNestedCollection, 183), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[183]); + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableGuidNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Guid? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid? [][]>(nullableGuidNestedCollection, 183), + Guid? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[183]); nullableGuidNestedCollection.SetPropertyIndexes( index: 183, originalValueIndex: 183, @@ -11517,17 +11333,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableGuidNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), keyComparer: new ListOfReferenceTypesComparer<Guid?[][], Guid?[]>(new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v)))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?[]>(new JsonCollectionOfReferencesReaderWriter<Guid?[][], Guid?[]>( new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance))), @@ -11536,23 +11352,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas SqliteJsonGuidReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), keyComparer: new ListOfNullableValueTypesComparer<Guid?[], Guid>(new NullableValueComparer<Guid>(new ValueComparer<Guid>( - (Guid v1, Guid v2) => v1 == v2, - (Guid v) => ((object)v).GetHashCode(), - (Guid v) => v))), + bool (Guid v1, Guid v2) => v1 == v2, + int (Guid v) => ((object)v).GetHashCode(), + Guid (Guid v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Guid?>(new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<Guid?[], Guid>( SqliteJsonGuidReaderWriter.Instance), elementMapping: SqliteGuidTypeMapping.Default)); - nullableGuidNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection", "TestNamespace") }); var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", @@ -11561,20 +11376,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableIPAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(instance) == null); + IPAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) == null, + IPAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddress(instance) == null); nullableIPAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress value) => ManyTypesUnsafeAccessors.NullableIPAddress(entity) = value); nullableIPAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[184]); + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress>(nullableIPAddress, 184), + IPAddress (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress>(nullableIPAddress), + object (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( index: 184, originalValueIndex: 184, @@ -11583,28 +11398,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))); - nullableIPAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))); var nullableIPAddressArray = runtimeEntityType.AddProperty( "NullableIPAddressArray", @@ -11612,20 +11426,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableIPAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableIPAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableIPAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(instance) == null); + IPAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) == null, + IPAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableIPAddressArray(instance) == null); nullableIPAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IPAddress[] value) => ManyTypesUnsafeAccessors.NullableIPAddressArray(entity) = value); nullableIPAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[185]); + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableIPAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(nullableIPAddressArray, 185), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(nullableIPAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( index: 185, originalValueIndex: 185, @@ -11634,53 +11448,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - nullableIPAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var nullableInt16 = runtimeEntityType.AddProperty( "NullableInt16", @@ -11689,20 +11502,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(instance).HasValue); + short? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt16(entity).HasValue), + short? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt16(instance).HasValue)); nullableInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? value) => ManyTypesUnsafeAccessors.NullableInt16(entity) = value); nullableInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>>(nullableInt16, 186), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[186]); + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? (InternalEntityEntry entry) => entry.ReadOriginalValue<short?>(nullableInt16, 186), + short? (InternalEntityEntry entry) => entry.GetCurrentValue<short?>(nullableInt16), + object (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( index: 186, originalValueIndex: 186, @@ -11711,22 +11524,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16.TypeMapping = ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt16.SetValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.Comparer)); nullableInt16.SetKeyValueComparer(new NullableValueComparer<short>(nullableInt16.TypeMapping.KeyComparer)); - nullableInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16", "TestNamespace") }); var nullableInt16Array = runtimeEntityType.AddProperty( "NullableInt16Array", @@ -11734,20 +11546,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(instance) == null); + short? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) == null, + short? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt16Array(instance) == null); nullableInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<short>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, short? [] value) => ManyTypesUnsafeAccessors.NullableInt16Array(entity) = value); nullableInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<short>[]>(nullableInt16Array, 187), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<short>[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[187]); + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + short? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<short? []>(nullableInt16Array, 187), + short? [] (InternalEntityEntry entry) => entry.GetCurrentValue<short? []>(nullableInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( index: 187, originalValueIndex: 187, @@ -11756,37 +11568,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), keyComparer: new ListOfNullableValueTypesComparer<short?[], short>(new NullableValueComparer<short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v))), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short?>(new JsonCollectionOfNullableStructsReaderWriter<short?[], short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<short?[], short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array", "TestNamespace") }); var nullableInt32 = runtimeEntityType.AddProperty( "NullableInt32", @@ -11795,20 +11606,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(instance).HasValue); + int? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt32(entity).HasValue), + int? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt32(instance).HasValue)); nullableInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? value) => ManyTypesUnsafeAccessors.NullableInt32(entity) = value); nullableInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>>(nullableInt32, 188), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[188]); + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? (InternalEntityEntry entry) => entry.ReadOriginalValue<int?>(nullableInt32, 188), + int? (InternalEntityEntry entry) => entry.GetCurrentValue<int?>(nullableInt32), + object (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( index: 188, originalValueIndex: 188, @@ -11817,22 +11628,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt32.SetValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.Comparer)); nullableInt32.SetKeyValueComparer(new NullableValueComparer<int>(nullableInt32.TypeMapping.KeyComparer)); - nullableInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32", "TestNamespace") }); var nullableInt32Array = runtimeEntityType.AddProperty( "NullableInt32Array", @@ -11840,20 +11650,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(instance) == null); + int? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) == null, + int? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32Array(instance) == null); nullableInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [] value) => ManyTypesUnsafeAccessors.NullableInt32Array(entity) = value); nullableInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[]>(nullableInt32Array, 189), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[189]); + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? []>(nullableInt32Array, 189), + int? [] (InternalEntityEntry entry) => entry.GetCurrentValue<int? []>(nullableInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( index: 189, originalValueIndex: 189, @@ -11862,37 +11672,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?>(new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array", "TestNamespace") }); var nullableInt32NestedCollection = runtimeEntityType.AddProperty( "NullableInt32NestedCollection", @@ -11900,20 +11709,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt32NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt32NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(instance) == null); + int? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) == null, + int? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(instance) == null); nullableInt32NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<int>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, int? [][] value) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(entity) = value); nullableInt32NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<int>[][]>(nullableInt32NestedCollection, 190), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[190]); + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt32NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + int? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<int? [][]>(nullableInt32NestedCollection, 190), + int? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<int? [][]>(nullableInt32NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[190]); nullableInt32NestedCollection.SetPropertyIndexes( index: 190, originalValueIndex: 190, @@ -11922,17 +11731,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt32NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), keyComparer: new ListOfReferenceTypesComparer<int?[][], int?[]>(new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v)))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?[]>(new JsonCollectionOfReferencesReaderWriter<int?[][], int?[]>( new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance))), @@ -11941,37 +11750,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt32ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), keyComparer: new ListOfNullableValueTypesComparer<int?[], int>(new NullableValueComparer<int>(new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v))), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<int?>(new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<int?[], int>( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - nullableInt32NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection", "TestNamespace") }); var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", @@ -11980,20 +11788,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(instance).HasValue); + long? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt64(entity).HasValue), + long? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt64(instance).HasValue)); nullableInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? value) => ManyTypesUnsafeAccessors.NullableInt64(entity) = value); nullableInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(nullableInt64, 191), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(nullableInt64, 191), + long? (InternalEntityEntry entry) => entry.GetCurrentValue<long?>(nullableInt64), + object (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( index: 191, originalValueIndex: 191, @@ -12002,22 +11810,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt64.SetValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.Comparer)); nullableInt64.SetKeyValueComparer(new NullableValueComparer<long>(nullableInt64.TypeMapping.KeyComparer)); - nullableInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64", "TestNamespace") }); var nullableInt64Array = runtimeEntityType.AddProperty( "NullableInt64Array", @@ -12025,20 +11832,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(instance) == null); + long? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) == null, + long? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64Array(instance) == null); nullableInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<long>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, long? [] value) => ManyTypesUnsafeAccessors.NullableInt64Array(entity) = value); nullableInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>[]>(nullableInt64Array, 192), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<long>[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + long? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<long? []>(nullableInt64Array, 192), + long? [] (InternalEntityEntry entry) => entry.GetCurrentValue<long? []>(nullableInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( index: 192, originalValueIndex: 192, @@ -12047,37 +11854,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?>(new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array", "TestNamespace") }); var nullableInt64NestedCollection = runtimeEntityType.AddProperty( "NullableInt64NestedCollection", @@ -12085,20 +11891,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt64NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt64NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(instance) == null); + List<long? [][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) == null, + List<long? [][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(instance) == null); nullableInt64NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<Nullable<long>[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<long? [][]> value) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(entity) = value); nullableInt64NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection, 193), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[193]); + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt64NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<long? [][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<long? [][]>>(nullableInt64NestedCollection, 193), + List<long? [][]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[193]); nullableInt64NestedCollection.SetPropertyIndexes( index: 193, originalValueIndex: 193, @@ -12107,17 +11913,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt64NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), keyComparer: new ListOfReferenceTypesComparer<List<long?[][]>, long?[][]>(new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?[][]>(new JsonCollectionOfReferencesReaderWriter<List<long?[][]>, long?[][]>( new JsonCollectionOfReferencesReaderWriter<long?[][], long?[]>( new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( @@ -12128,17 +11934,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), keyComparer: new ListOfReferenceTypesComparer<long?[][], long?[]>(new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v)))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?[]>(new JsonCollectionOfReferencesReaderWriter<long?[][], long?[]>( new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance))), @@ -12147,37 +11953,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonInt64ReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), keyComparer: new ListOfNullableValueTypesComparer<long?[], long>(new NullableValueComparer<long>(new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v))), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<long?>(new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<long?[], long>( JsonInt64ReaderWriter.Instance), elementMapping: LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))))); - nullableInt64NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection", "TestNamespace") }); var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", @@ -12186,20 +11991,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(instance).HasValue); + sbyte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableInt8(entity).HasValue), + sbyte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableInt8(instance).HasValue)); nullableInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? value) => ManyTypesUnsafeAccessors.NullableInt8(entity) = value); nullableInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>>(nullableInt8, 194), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[194]); + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte?>(nullableInt8, 194), + sbyte? (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte?>(nullableInt8), + object (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( index: 194, originalValueIndex: 194, @@ -12208,22 +12013,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8.TypeMapping = SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableInt8.SetValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.Comparer)); nullableInt8.SetKeyValueComparer(new NullableValueComparer<sbyte>(nullableInt8.TypeMapping.KeyComparer)); - nullableInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8", "TestNamespace") }); var nullableInt8Array = runtimeEntityType.AddProperty( "NullableInt8Array", @@ -12231,20 +12035,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(instance) == null); + sbyte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) == null, + sbyte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableInt8Array(instance) == null); nullableInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<sbyte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, sbyte? [] value) => ManyTypesUnsafeAccessors.NullableInt8Array(entity) = value); nullableInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<sbyte>[]>(nullableInt8Array, 195), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[195]); + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + sbyte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<sbyte? []>(nullableInt8Array, 195), + sbyte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<sbyte? []>(nullableInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( index: 195, originalValueIndex: 195, @@ -12253,37 +12057,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<sbyte?[], sbyte>(new NullableValueComparer<sbyte>(new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v))), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<sbyte?>(new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( JsonSByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<sbyte?[], sbyte>( JsonSByteReaderWriter.Instance), elementMapping: SByteTypeMapping.Default.Clone( comparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), keyComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), providerValueComparer: new ValueComparer<sbyte>( - (sbyte v1, sbyte v2) => v1 == v2, - (sbyte v) => (int)v, - (sbyte v) => v), + bool (sbyte v1, sbyte v2) => v1 == v2, + int (sbyte v) => ((int)(v)), + sbyte (sbyte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array", "TestNamespace") }); var nullablePhysicalAddress = runtimeEntityType.AddProperty( "NullablePhysicalAddress", @@ -12292,20 +12095,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullablePhysicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(instance) == null); nullablePhysicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(entity) = value); nullablePhysicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[196]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(nullablePhysicalAddress, 196), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( index: 196, originalValueIndex: 196, @@ -12314,28 +12117,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - nullablePhysicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var nullablePhysicalAddressArray = runtimeEntityType.AddProperty( "NullablePhysicalAddressArray", @@ -12343,20 +12145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(instance) == null); nullablePhysicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(entity) = value); nullablePhysicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[197]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(nullablePhysicalAddressArray, 197), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( index: 197, originalValueIndex: 197, @@ -12365,53 +12167,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); - nullablePhysicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( "NullablePhysicalAddressNestedCollection", @@ -12419,20 +12220,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullablePhysicalAddressNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullablePhysicalAddressNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(instance) == null); + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) == null, + IEnumerable<PhysicalAddress[][]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(instance) == null); nullablePhysicalAddressNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, IEnumerable<PhysicalAddress[][]> value) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(entity) = value); nullablePhysicalAddressNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[198]); + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullablePhysicalAddressNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection, 198), + IEnumerable<PhysicalAddress[][]> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[198]); nullablePhysicalAddressNestedCollection.SetPropertyIndexes( index: 198, originalValueIndex: 198, @@ -12441,109 +12242,108 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullablePhysicalAddressNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), keyComparer: new ListOfReferenceTypesComparer<List<PhysicalAddress[][]>, PhysicalAddress[][]>(new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress[][]>(new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<PhysicalAddress[][]>, PhysicalAddress[][]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[][], PhysicalAddress[]>(new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v))), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress[]>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[][], PhysicalAddress[]>( new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))))); - nullablePhysicalAddressNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))))); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -12552,20 +12352,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableString>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableString.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableString(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableString(instance) == null); nullableString.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.NullableString(entity) = value); nullableString.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[199]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableString(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(nullableString, 199), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(nullableString), + object (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( index: 199, originalValueIndex: 199, @@ -12573,7 +12373,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); nullableString.TypeMapping = SqliteStringTypeMapping.Default; - nullableString.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString", "TestNamespace") }); var nullableStringArray = runtimeEntityType.AddProperty( "NullableStringArray", @@ -12581,20 +12380,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringArray(instance) == null); nullableStringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.NullableStringArray(entity) = value); nullableStringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[200]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(nullableStringArray, 200), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(nullableStringArray), + object (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( index: 200, originalValueIndex: 200, @@ -12603,23 +12402,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - nullableStringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray", "TestNamespace") }); var nullableStringNestedCollection = runtimeEntityType.AddProperty( "NullableStringNestedCollection", @@ -12627,20 +12425,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableStringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableStringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(instance) == null); nullableStringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(entity) = value); nullableStringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[201]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableStringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(nullableStringNestedCollection, 201), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(nullableStringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[201]); nullableStringNestedCollection.SetPropertyIndexes( index: 201, originalValueIndex: 201, @@ -12649,17 +12447,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableStringNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string[]>(new JsonCollectionOfReferencesReaderWriter<string[][], string[]>( new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance))), @@ -12668,23 +12466,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default)); - nullableStringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection", "TestNamespace") }); var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", @@ -12693,20 +12490,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(instance).HasValue); + TimeOnly? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(entity).HasValue), + TimeOnly? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeOnly(instance).HasValue)); nullableTimeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? value) => ManyTypesUnsafeAccessors.NullableTimeOnly(entity) = value); nullableTimeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>>(nullableTimeOnly, 202), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[202]); + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly?>(nullableTimeOnly, 202), + TimeOnly? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly?>(nullableTimeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( index: 202, originalValueIndex: 202, @@ -12716,7 +12513,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnly.TypeMapping = SqliteTimeOnlyTypeMapping.Default; nullableTimeOnly.SetValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.Comparer)); nullableTimeOnly.SetKeyValueComparer(new NullableValueComparer<TimeOnly>(nullableTimeOnly.TypeMapping.KeyComparer)); - nullableTimeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly", "TestNamespace") }); var nullableTimeOnlyArray = runtimeEntityType.AddProperty( "NullableTimeOnlyArray", @@ -12724,20 +12520,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(instance) == null); + TimeOnly? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) == null, + TimeOnly? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(instance) == null); nullableTimeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeOnly>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly? [] value) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(entity) = value); nullableTimeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray, 203), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[203]); + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly? []>(nullableTimeOnlyArray, 203), + TimeOnly? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( index: 203, originalValueIndex: 203, @@ -12746,23 +12542,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeOnly?[], TimeOnly>(new NullableValueComparer<TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v))), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeOnly?>(new JsonCollectionOfNullableStructsReaderWriter<TimeOnly?[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<TimeOnly?[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqliteTimeOnlyTypeMapping.Default); - nullableTimeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray", "TestNamespace") }); var nullableTimeSpan = runtimeEntityType.AddProperty( "NullableTimeSpan", @@ -12771,20 +12566,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableTimeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(instance).HasValue); + TimeSpan? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(entity).HasValue), + TimeSpan? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableTimeSpan(instance).HasValue)); nullableTimeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? value) => ManyTypesUnsafeAccessors.NullableTimeSpan(entity) = value); nullableTimeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>>(nullableTimeSpan, 204), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[204]); + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan?>(nullableTimeSpan, 204), + TimeSpan? (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan?>(nullableTimeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( index: 204, originalValueIndex: 204, @@ -12793,22 +12588,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpan.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); nullableTimeSpan.SetValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.Comparer)); nullableTimeSpan.SetKeyValueComparer(new NullableValueComparer<TimeSpan>(nullableTimeSpan.TypeMapping.KeyComparer)); - nullableTimeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan", "TestNamespace") }); var nullableTimeSpanArray = runtimeEntityType.AddProperty( "NullableTimeSpanArray", @@ -12816,20 +12610,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableTimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableTimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableTimeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(instance) == null); + TimeSpan? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) == null, + TimeSpan? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(instance) == null); nullableTimeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<TimeSpan>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan? [] value) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(entity) = value); nullableTimeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray, 205), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[205]); + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableTimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan? []>(nullableTimeSpanArray, 205), + TimeSpan? [] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( index: 205, originalValueIndex: 205, @@ -12838,37 +12632,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), keyComparer: new ListOfNullableValueTypesComparer<TimeSpan?[], TimeSpan>(new NullableValueComparer<TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v))), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeSpan?>(new JsonCollectionOfNullableStructsReaderWriter<TimeSpan?[], TimeSpan>( JsonTimeSpanReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<TimeSpan?[], TimeSpan>( JsonTimeSpanReaderWriter.Instance), elementMapping: TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - nullableTimeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray", "TestNamespace") }); var nullableUInt16 = runtimeEntityType.AddProperty( "NullableUInt16", @@ -12877,20 +12670,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(instance).HasValue); + ushort? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt16(entity).HasValue), + ushort? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt16(instance).HasValue)); nullableUInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? value) => ManyTypesUnsafeAccessors.NullableUInt16(entity) = value); nullableUInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>>(nullableUInt16, 206), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[206]); + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort?>(nullableUInt16, 206), + ushort? (InternalEntityEntry entry) => entry.GetCurrentValue<ushort?>(nullableUInt16), + object (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( index: 206, originalValueIndex: 206, @@ -12899,22 +12692,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt16.SetValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.Comparer)); nullableUInt16.SetKeyValueComparer(new NullableValueComparer<ushort>(nullableUInt16.TypeMapping.KeyComparer)); - nullableUInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16", "TestNamespace") }); var nullableUInt16Array = runtimeEntityType.AddProperty( "NullableUInt16Array", @@ -12922,20 +12714,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(instance) == null); + ushort? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) == null, + ushort? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt16Array(instance) == null); nullableUInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ushort>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort? [] value) => ManyTypesUnsafeAccessors.NullableUInt16Array(entity) = value); nullableUInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ushort>[]>(nullableUInt16Array, 207), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[207]); + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort? []>(nullableUInt16Array, 207), + ushort? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort? []>(nullableUInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( index: 207, originalValueIndex: 207, @@ -12944,37 +12736,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ushort?[], ushort>(new NullableValueComparer<ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v))), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ushort?>(new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( JsonUInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ushort?[], ushort>( JsonUInt16ReaderWriter.Instance), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array", "TestNamespace") }); var nullableUInt32 = runtimeEntityType.AddProperty( "NullableUInt32", @@ -12983,20 +12774,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(instance).HasValue); + uint? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt32(entity).HasValue), + uint? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt32(instance).HasValue)); nullableUInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? value) => ManyTypesUnsafeAccessors.NullableUInt32(entity) = value); nullableUInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>>(nullableUInt32, 208), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[208]); + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? (InternalEntityEntry entry) => entry.ReadOriginalValue<uint?>(nullableUInt32, 208), + uint? (InternalEntityEntry entry) => entry.GetCurrentValue<uint?>(nullableUInt32), + object (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( index: 208, originalValueIndex: 208, @@ -13005,22 +12796,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt32.SetValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.Comparer)); nullableUInt32.SetKeyValueComparer(new NullableValueComparer<uint>(nullableUInt32.TypeMapping.KeyComparer)); - nullableUInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32", "TestNamespace") }); var nullableUInt32Array = runtimeEntityType.AddProperty( "NullableUInt32Array", @@ -13028,20 +12818,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(instance) == null); + uint? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) == null, + uint? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt32Array(instance) == null); nullableUInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<uint>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint? [] value) => ManyTypesUnsafeAccessors.NullableUInt32Array(entity) = value); nullableUInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<uint>[]>(nullableUInt32Array, 209), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[209]); + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint? []>(nullableUInt32Array, 209), + uint? [] (InternalEntityEntry entry) => entry.GetCurrentValue<uint? []>(nullableUInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( index: 209, originalValueIndex: 209, @@ -13050,37 +12840,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), keyComparer: new ListOfNullableValueTypesComparer<uint?[], uint>(new NullableValueComparer<uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v))), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<uint?>(new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( JsonUInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<uint?[], uint>( JsonUInt32ReaderWriter.Instance), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array", "TestNamespace") }); var nullableUInt64 = runtimeEntityType.AddProperty( "NullableUInt64", @@ -13089,20 +12878,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(instance).HasValue); + ulong? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt64(entity).HasValue), + ulong? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt64(instance).HasValue)); nullableUInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? value) => ManyTypesUnsafeAccessors.NullableUInt64(entity) = value); nullableUInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>>(nullableUInt64, 210), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[210]); + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong?>(nullableUInt64, 210), + ulong? (InternalEntityEntry entry) => entry.GetCurrentValue<ulong?>(nullableUInt64), + object (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( index: 210, originalValueIndex: 210, @@ -13112,7 +12901,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64.TypeMapping = SqliteULongTypeMapping.Default; nullableUInt64.SetValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.Comparer)); nullableUInt64.SetKeyValueComparer(new NullableValueComparer<ulong>(nullableUInt64.TypeMapping.KeyComparer)); - nullableUInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64", "TestNamespace") }); var nullableUInt64Array = runtimeEntityType.AddProperty( "NullableUInt64Array", @@ -13120,20 +12908,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(instance) == null); + ulong? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) == null, + ulong? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt64Array(instance) == null); nullableUInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<ulong>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong? [] value) => ManyTypesUnsafeAccessors.NullableUInt64Array(entity) = value); nullableUInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<ulong>[]>(nullableUInt64Array, 211), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[211]); + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong? []>(nullableUInt64Array, 211), + ulong? [] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong? []>(nullableUInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( index: 211, originalValueIndex: 211, @@ -13142,23 +12930,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), keyComparer: new ListOfNullableValueTypesComparer<ulong?[], ulong>(new NullableValueComparer<ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v))), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ulong?>(new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( JsonUInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<ulong?[], ulong>( JsonUInt64ReaderWriter.Instance), elementMapping: SqliteULongTypeMapping.Default); - nullableUInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array", "TestNamespace") }); var nullableUInt8 = runtimeEntityType.AddProperty( "NullableUInt8", @@ -13167,20 +12954,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity).HasValue, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(instance).HasValue); + byte? (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => !(ManyTypesUnsafeAccessors.NullableUInt8(entity).HasValue), + byte? (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => !(ManyTypesUnsafeAccessors.NullableUInt8(instance).HasValue)); nullableUInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? value) => ManyTypesUnsafeAccessors.NullableUInt8(entity) = value); nullableUInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>>(nullableUInt8, 212), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[212]); + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? (InternalEntityEntry entry) => entry.ReadOriginalValue<byte?>(nullableUInt8, 212), + byte? (InternalEntityEntry entry) => entry.GetCurrentValue<byte?>(nullableUInt8), + object (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( index: 212, originalValueIndex: 212, @@ -13189,22 +12976,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); nullableUInt8.SetValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.Comparer)); nullableUInt8.SetKeyValueComparer(new NullableValueComparer<byte>(nullableUInt8.TypeMapping.KeyComparer)); - nullableUInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8", "TestNamespace") }); var nullableUInt8Array = runtimeEntityType.AddProperty( "NullableUInt8Array", @@ -13212,20 +12998,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(instance) == null); + byte? [] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) == null, + byte? [] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8Array(instance) == null); nullableUInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [] value) => ManyTypesUnsafeAccessors.NullableUInt8Array(entity) = value); nullableUInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[]>(nullableUInt8Array, 213), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[213]); + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? []>(nullableUInt8Array, 213), + byte? [] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? []>(nullableUInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( index: 213, originalValueIndex: 213, @@ -13234,37 +13020,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?>(new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - nullableUInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array", "TestNamespace") }); var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( "NullableUInt8NestedCollection", @@ -13272,20 +13057,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(instance) == null); + byte? [][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) == null, + byte? [][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(instance) == null); nullableUInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Nullable<byte>[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte? [][] value) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(entity) = value); nullableUInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<byte>[][]>(nullableUInt8NestedCollection, 214), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[214]); + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte? [][] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte? [][]>(nullableUInt8NestedCollection, 214), + byte? [][] (InternalEntityEntry entry) => entry.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[214]); nullableUInt8NestedCollection.SetPropertyIndexes( index: 214, originalValueIndex: 214, @@ -13294,17 +13079,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUInt8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), keyComparer: new ListOfReferenceTypesComparer<byte?[][], byte?[]>(new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?[]>(new JsonCollectionOfReferencesReaderWriter<byte?[][], byte?[]>( new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance))), @@ -13313,37 +13098,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonByteReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), keyComparer: new ListOfNullableValueTypesComparer<byte?[], byte>(new NullableValueComparer<byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v))), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte?>(new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter<byte?[], byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")))); - nullableUInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection", "TestNamespace") }); var nullableUri = runtimeEntityType.AddProperty( "NullableUri", @@ -13352,20 +13136,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); nullableUri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUri(instance) == null); nullableUri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.NullableUri(entity) = value); nullableUri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[215]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(nullableUri, 215), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(nullableUri), + object (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( index: 215, originalValueIndex: 215, @@ -13374,26 +13158,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUri.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - nullableUri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var nullableUriArray = runtimeEntityType.AddProperty( "NullableUriArray", @@ -13401,20 +13184,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<NullableUriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); nullableUriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.NullableUriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.NullableUriArray(instance) == null); nullableUriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.NullableUriArray(entity) = value); nullableUriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[216]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.NullableUriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(nullableUriArray, 216), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(nullableUriArray), + object (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( index: 216, originalValueIndex: 216, @@ -13423,51 +13206,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Uri>(new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); - nullableUriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); var physicalAddress = runtimeEntityType.AddProperty( "PhysicalAddress", @@ -13475,20 +13257,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddress", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddress>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddress.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddress(instance) == null); physicalAddress.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddress(entity) = value); physicalAddress.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[217]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddress(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddress, 217), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddress), + object (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( index: 217, originalValueIndex: 217, @@ -13497,28 +13279,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddress.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - physicalAddress.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var physicalAddressArray = runtimeEntityType.AddProperty( "PhysicalAddressArray", @@ -13526,20 +13307,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("PhysicalAddressArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); physicalAddressArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(instance) == null); + PhysicalAddress[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) == null, + PhysicalAddress[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressArray(instance) == null); physicalAddressArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress[] value) => ManyTypesUnsafeAccessors.PhysicalAddressArray(entity) = value); physicalAddressArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress[]>(physicalAddressArray, 218), + PhysicalAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray), + object (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( index: 218, originalValueIndex: 218, @@ -13548,53 +13329,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<PhysicalAddress[], PhysicalAddress>(new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v)), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<PhysicalAddress>(new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<PhysicalAddress[], PhysicalAddress>( new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v))))); - physicalAddressArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v))))); var physicalAddressToBytesConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToBytesConverterProperty", @@ -13603,20 +13383,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToBytesConverter()); physicalAddressToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(instance) == null); physicalAddressToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(entity) = value); physicalAddressToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToBytesConverterProperty, 219), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( index: 219, originalValueIndex: 219, @@ -13625,28 +13405,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), mappingInfo: new RelationalTypeMappingInfo( size: 8), converter: new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)), + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<PhysicalAddress, byte[]>( - (PhysicalAddress v) => v.GetAddressBytes(), - (byte[] v) => new PhysicalAddress(v)))); - physicalAddressToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty", "TestNamespace") }); + byte[] (PhysicalAddress v) => v.GetAddressBytes(), + PhysicalAddress (byte[] v) => new PhysicalAddress(v)))); var physicalAddressToStringConverterProperty = runtimeEntityType.AddProperty( "PhysicalAddressToStringConverterProperty", @@ -13655,20 +13434,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<PhysicalAddressToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new PhysicalAddressToStringConverter()); physicalAddressToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(instance) == null); + PhysicalAddress (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) == null, + PhysicalAddress (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(instance) == null); physicalAddressToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, PhysicalAddress value) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(entity) = value); physicalAddressToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), - (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.PhysicalAddressToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + PhysicalAddress (InternalEntityEntry entry) => entry.ReadOriginalValue<PhysicalAddress>(physicalAddressToStringConverterProperty, 220), + PhysicalAddress (InternalEntityEntry entry) => entry.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( index: 220, originalValueIndex: 220, @@ -13677,28 +13456,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); physicalAddressToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), keyComparer: new ValueComparer<PhysicalAddress>( - (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), - (PhysicalAddress v) => ((object)v).GetHashCode(), - (PhysicalAddress v) => v), + bool (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + int (PhysicalAddress v) => ((object)v).GetHashCode(), + PhysicalAddress (PhysicalAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 20), converter: new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)), + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<PhysicalAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<PhysicalAddress, string>( - (PhysicalAddress v) => ((object)v).ToString(), - (string v) => PhysicalAddress.Parse(v)))); - physicalAddressToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty", "TestNamespace") }); + string (PhysicalAddress v) => ((object)v).ToString(), + PhysicalAddress (string v) => PhysicalAddress.Parse(v)))); var @string = runtimeEntityType.AddProperty( "String", @@ -13706,20 +13484,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("String", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<String>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); @string.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.String(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.String(instance) == null); @string.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.String(entity) = value); @string.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), - (ValueBuffer valueBuffer) => valueBuffer[221]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.String(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(@string, 221), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(@string), + object (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( index: 221, originalValueIndex: 221, @@ -13727,7 +13505,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); @string.TypeMapping = SqliteStringTypeMapping.Default; - @string.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String", "TestNamespace") }); var stringArray = runtimeEntityType.AddProperty( "StringArray", @@ -13735,20 +13512,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(instance) == null); + string[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringArray(entity) == null, + string[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringArray(instance) == null); stringArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[] value) => ManyTypesUnsafeAccessors.StringArray(entity) = value); stringArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[]>(stringArray, 222), + string[] (InternalEntityEntry entry) => entry.GetCurrentValue<string[]>(stringArray), + object (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( index: 222, originalValueIndex: 222, @@ -13757,23 +13534,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - stringArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray", "TestNamespace") }); var stringNestedCollection = runtimeEntityType.AddProperty( "StringNestedCollection", @@ -13781,20 +13557,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringNestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringNestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(instance) == null); + string[][] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) == null, + string[][] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringNestedCollection(instance) == null); stringNestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string[][] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string[][] value) => ManyTypesUnsafeAccessors.StringNestedCollection(entity) = value); stringNestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), - (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[223]); + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringNestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string[][] (InternalEntityEntry entry) => entry.ReadOriginalValue<string[][]>(stringNestedCollection, 223), + string[][] (InternalEntityEntry entry) => entry.GetCurrentValue<string[][]>(stringNestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[223]); stringNestedCollection.SetPropertyIndexes( index: 223, originalValueIndex: 223, @@ -13803,17 +13579,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringNestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), keyComparer: new ListOfReferenceTypesComparer<string[][], string[]>(new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v))), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v))), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string[]>(new JsonCollectionOfReferencesReaderWriter<string[][], string[]>( new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance))), @@ -13822,23 +13598,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas JsonStringReaderWriter.Instance)), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<string[], string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<string[], string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default)); - stringNestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection", "TestNamespace") }); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -13847,20 +13622,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBoolConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToBoolConverter()); stringToBoolConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(instance) == null); stringToBoolConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(entity) = value); stringToBoolConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBoolConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBoolConverterProperty, 224), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBoolConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( index: 224, originalValueIndex: 224, @@ -13869,28 +13644,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBoolConverterProperty.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)), + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, bool>( JsonBoolReaderWriter.Instance, new ValueConverter<string, bool>( - (string v) => Convert.ToBoolean(v), - (bool v) => Convert.ToString(v)))); - stringToBoolConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty", "TestNamespace") }); + bool (string v) => Convert.ToBoolean(v), + string (bool v) => Convert.ToString(v)))); var stringToBytesConverterProperty = runtimeEntityType.AddProperty( "StringToBytesConverterProperty", @@ -13899,20 +13673,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToBytesConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); stringToBytesConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(instance) == null); stringToBytesConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(entity) = value); stringToBytesConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[225]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToBytesConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToBytesConverterProperty, 225), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToBytesConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( index: 225, originalValueIndex: 225, @@ -13921,26 +13695,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToBytesConverterProperty.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), converter: new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, byte[]>( SqliteJsonByteArrayReaderWriter.Instance, new ValueConverter<string, byte[]>( - (string v) => Encoding.GetEncoding(12000).GetBytes(v), - (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); - stringToBytesConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty", "TestNamespace") }); + byte[] (string v) => Encoding.GetEncoding(12000).GetBytes(v), + string (byte[] v) => Encoding.GetEncoding(12000).GetString(v)))); var stringToCharConverterProperty = runtimeEntityType.AddProperty( "StringToCharConverterProperty", @@ -13949,20 +13722,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToCharConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToCharConverter()); stringToCharConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(instance) == null); stringToCharConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(entity) = value); stringToCharConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[226]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToCharConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToCharConverterProperty, 226), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToCharConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( index: 226, originalValueIndex: 226, @@ -13971,29 +13744,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToCharConverterProperty.TypeMapping = CharTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<char>( - (char v1, char v2) => v1 == v2, - (char v) => (int)v, - (char v) => v), + bool (char v1, char v2) => v1 == v2, + int (char v) => ((int)(v)), + char (char v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT", size: 1), converter: new ValueConverter<string, char>( - (string v) => v.Length < 1 ? '\0' : v[0], - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, char>( JsonCharReaderWriter.Instance, new ValueConverter<string, char>( - (string v) => v.Length < 1 ? '\0' : v[0], - (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToCharConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty", "TestNamespace") }); + char (string v) => (v.Length < 1 ? '\0' : v[0]), + string (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToDateOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToDateOnlyConverterProperty", @@ -14002,20 +13774,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateOnlyConverter()); stringToDateOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(instance) == null); stringToDateOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(entity) = value); stringToDateOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[227]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateOnlyConverterProperty, 227), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( index: 227, originalValueIndex: 227, @@ -14024,28 +13796,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateOnlyConverterProperty.TypeMapping = SqliteDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateOnly>( - (DateOnly v1, DateOnly v2) => v1.Equals(v2), - (DateOnly v) => ((object)v).GetHashCode(), - (DateOnly v) => v), + bool (DateOnly v1, DateOnly v2) => v1.Equals(v2), + int (DateOnly v) => ((object)v).GetHashCode(), + DateOnly (DateOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 10), converter: new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateOnly>( JsonDateOnlyReaderWriter.Instance, new ValueConverter<string, DateOnly>( - (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); - stringToDateOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty", "TestNamespace") }); + DateOnly (string v) => DateOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (DateOnly v) => v.ToString("yyyy\\-MM\\-dd")))); var stringToDateTimeConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeConverterProperty", @@ -14054,20 +13825,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeConverter()); stringToDateTimeConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(instance) == null); stringToDateTimeConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(entity) = value); stringToDateTimeConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[228]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeConverterProperty, 228), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( index: 228, originalValueIndex: 228, @@ -14076,28 +13847,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeConverterProperty.TypeMapping = SqliteDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTime>( SqliteJsonDateTimeReaderWriter.Instance, new ValueConverter<string, DateTime>( - (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), - (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); - stringToDateTimeConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty", "TestNamespace") }); + DateTime (string v) => DateTime.Parse(v, CultureInfo.InvariantCulture), + string (DateTime v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFF")))); var stringToDateTimeOffsetConverterProperty = runtimeEntityType.AddProperty( "StringToDateTimeOffsetConverterProperty", @@ -14106,20 +13876,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDateTimeOffsetConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToDateTimeOffsetConverter()); stringToDateTimeOffsetConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(instance) == null); stringToDateTimeOffsetConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(entity) = value); stringToDateTimeOffsetConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[229]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDateTimeOffsetConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDateTimeOffsetConverterProperty, 229), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( index: 229, originalValueIndex: 229, @@ -14128,28 +13898,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDateTimeOffsetConverterProperty.TypeMapping = SqliteDateTimeOffsetTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<DateTimeOffset>( - (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), - (DateTimeOffset v) => ((object)v).GetHashCode(), - (DateTimeOffset v) => v), + bool (DateTimeOffset v1, DateTimeOffset v2) => v1.EqualsExact(v2), + int (DateTimeOffset v) => ((object)v).GetHashCode(), + DateTimeOffset (DateTimeOffset v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, DateTimeOffset>( SqliteJsonDateTimeOffsetReaderWriter.Instance, new ValueConverter<string, DateTimeOffset>( - (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), - (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); - stringToDateTimeOffsetConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty", "TestNamespace") }); + DateTimeOffset (string v) => DateTimeOffset.Parse(v, CultureInfo.InvariantCulture), + string (DateTimeOffset v) => v.ToString("yyyy\\-MM\\-dd HH\\:mm\\:ss.FFFFFFFzzz")))); var stringToDecimalNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDecimalNumberConverterProperty", @@ -14158,20 +13927,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDecimalNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<decimal>()); stringToDecimalNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(instance) == null); stringToDecimalNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(entity) = value); stringToDecimalNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[230]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDecimalNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDecimalNumberConverterProperty, 230), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDecimalNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( index: 230, originalValueIndex: 230, @@ -14180,28 +13949,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDecimalNumberConverterProperty.TypeMapping = SqliteDecimalTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<decimal>( - (decimal v1, decimal v2) => v1 == v2, - (decimal v) => ((object)v).GetHashCode(), - (decimal v) => v), + bool (decimal v1, decimal v2) => v1 == v2, + int (decimal v) => ((object)v).GetHashCode(), + decimal (decimal v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 64), converter: new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, decimal>( SqliteJsonDecimalReaderWriter.Instance, new ValueConverter<string, decimal>( - (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToDecimalNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty", "TestNamespace") }); + decimal (string v) => decimal.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (decimal v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToDoubleNumberConverterProperty = runtimeEntityType.AddProperty( "StringToDoubleNumberConverterProperty", @@ -14210,20 +13978,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToDoubleNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<double>()); stringToDoubleNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(instance) == null); stringToDoubleNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(entity) = value); stringToDoubleNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[231]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToDoubleNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToDoubleNumberConverterProperty, 231), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToDoubleNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( index: 231, originalValueIndex: 231, @@ -14232,29 +14000,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToDoubleNumberConverterProperty.TypeMapping = DoubleTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<double>( - (double v1, double v2) => v1.Equals(v2), - (double v) => ((object)v).GetHashCode(), - (double v) => v), + bool (double v1, double v2) => v1.Equals(v2), + int (double v) => ((object)v).GetHashCode(), + double (double v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "REAL", size: 64), converter: new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)), + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, double>( JsonDoubleReaderWriter.Instance, new ValueConverter<string, double>( - (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", (object)v)))); - stringToDoubleNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty", "TestNamespace") }); + double (string v) => double.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (double v) => string.Format(CultureInfo.InvariantCulture, "{0:R}", ((object)(v)))))); var stringToEnumConverterProperty = runtimeEntityType.AddProperty( "StringToEnumConverterProperty", @@ -14263,20 +14030,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToEnumConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToEnumConverter<CompiledModelTestBase.EnumU32>()); stringToEnumConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(instance) == null); stringToEnumConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(entity) = value); stringToEnumConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[232]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToEnumConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToEnumConverterProperty, 232), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToEnumConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( index: 232, originalValueIndex: 232, @@ -14285,28 +14052,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToEnumConverterProperty.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<string, uint>( - (string v) => (uint)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (uint value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()), + uint (string v) => ((uint)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, uint>( JsonUInt32ReaderWriter.Instance, new ValueConverter<string, uint>( - (string v) => (uint)StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v), - (uint value) => ((object)(CompiledModelTestBase.EnumU32)value).ToString()))); - stringToEnumConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty", "TestNamespace") }); + uint (string v) => ((uint)(StringEnumConverter<string, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32>.ConvertToEnum(v))), + string (uint value) => ((object)((CompiledModelTestBase.EnumU32)(value))).ToString()))); var stringToGuidConverterProperty = runtimeEntityType.AddProperty( "StringToGuidConverterProperty", @@ -14314,20 +14080,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringToGuidConverterProperty", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToGuidConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); stringToGuidConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(instance) == null); stringToGuidConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(entity) = value); stringToGuidConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[233]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToGuidConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToGuidConverterProperty, 233), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToGuidConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( index: 233, originalValueIndex: 233, @@ -14335,7 +14101,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); stringToGuidConverterProperty.TypeMapping = SqliteStringTypeMapping.Default; - stringToGuidConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty", "TestNamespace") }); var stringToIntNumberConverterProperty = runtimeEntityType.AddProperty( "StringToIntNumberConverterProperty", @@ -14344,20 +14109,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToIntNumberConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToNumberConverter<int>()); stringToIntNumberConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(instance) == null); stringToIntNumberConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(entity) = value); stringToIntNumberConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[234]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToIntNumberConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToIntNumberConverterProperty, 234), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToIntNumberConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( index: 234, originalValueIndex: 234, @@ -14366,29 +14131,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToIntNumberConverterProperty.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER", size: 64), converter: new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)), + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<string, int>( - (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), - (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v)))); - stringToIntNumberConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty", "TestNamespace") }); + int (string v) => int.Parse(v, NumberStyles.Any, CultureInfo.InvariantCulture), + string (int v) => string.Format(CultureInfo.InvariantCulture, "{0}", ((object)(v)))))); var stringToTimeOnlyConverterProperty = runtimeEntityType.AddProperty( "StringToTimeOnlyConverterProperty", @@ -14397,20 +14161,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeOnlyConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeOnlyConverter()); stringToTimeOnlyConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(instance) == null); stringToTimeOnlyConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(entity) = value); stringToTimeOnlyConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeOnlyConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeOnlyConverterProperty, 235), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeOnlyConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( index: 235, originalValueIndex: 235, @@ -14419,28 +14183,27 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeOnlyConverterProperty.TypeMapping = SqliteTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeOnly>( JsonTimeOnlyReaderWriter.Instance, new ValueConverter<string, TimeOnly>( - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o")))); - stringToTimeOnlyConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty", "TestNamespace") }); + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o"))))); var stringToTimeSpanConverterProperty = runtimeEntityType.AddProperty( "StringToTimeSpanConverterProperty", @@ -14449,20 +14212,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToTimeSpanConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToTimeSpanConverter()); stringToTimeSpanConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(instance) == null); stringToTimeSpanConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(entity) = value); stringToTimeSpanConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[236]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToTimeSpanConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToTimeSpanConverterProperty, 236), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToTimeSpanConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( index: 236, originalValueIndex: 236, @@ -14471,29 +14234,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToTimeSpanConverterProperty.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT", size: 48), converter: new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, TimeSpan>( JsonTimeSpanReaderWriter.Instance, new ValueConverter<string, TimeSpan>( - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), - (TimeSpan v) => v.ToString("c")))); - stringToTimeSpanConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty", "TestNamespace") }); + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture), + string (TimeSpan v) => v.ToString("c")))); var stringToUriConverterProperty = runtimeEntityType.AddProperty( "StringToUriConverterProperty", @@ -14502,20 +14264,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<StringToUriConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new StringToUriConverter()); stringToUriConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(instance) == null); + string (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) == null, + string (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(instance) == null); stringToUriConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, string value) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(entity) = value); stringToUriConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[237]); + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.StringToUriConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(stringToUriConverterProperty, 237), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(stringToUriConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( index: 237, originalValueIndex: 237, @@ -14524,26 +14286,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); stringToUriConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<string, string>( JsonStringReaderWriter.Instance, new ValueConverter<string, string>( - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), - (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); - stringToUriConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty", "TestNamespace") }); + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString(), + string (string v) => ((object)new Uri(v, UriKind.RelativeOrAbsolute)).ToString()))); var timeOnly = runtimeEntityType.AddProperty( "TimeOnly", @@ -14552,20 +14313,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnly>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeOnly(0, 0, 0)); timeOnly.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnly(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnly(instance) == default(TimeOnly)); timeOnly.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnly(entity) = value); timeOnly.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[238]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnly(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnly, 238), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnly), + object (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( index: 238, originalValueIndex: 238, @@ -14573,7 +14334,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); timeOnly.TypeMapping = SqliteTimeOnlyTypeMapping.Default; - timeOnly.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly", "TestNamespace") }); var timeOnlyArray = runtimeEntityType.AddProperty( "TimeOnlyArray", @@ -14581,20 +14341,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeOnlyArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeOnlyArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(instance) == null); + TimeOnly[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) == null, + TimeOnly[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyArray(instance) == null); timeOnlyArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly[] value) => ManyTypesUnsafeAccessors.TimeOnlyArray(entity) = value); timeOnlyArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[239]); + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly[]>(timeOnlyArray, 239), + TimeOnly[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly[]>(timeOnlyArray), + object (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( index: 239, originalValueIndex: 239, @@ -14603,23 +14363,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), keyComparer: new ListOfValueTypesComparer<TimeOnly[], TimeOnly>(new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v)), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeOnly>(new JsonCollectionOfStructsReaderWriter<TimeOnly[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<TimeOnly[], TimeOnly>( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqliteTimeOnlyTypeMapping.Default); - timeOnlyArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray", "TestNamespace") }); var timeOnlyToStringConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToStringConverterProperty", @@ -14628,20 +14387,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToStringConverter()); timeOnlyToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(instance) == default(TimeOnly)); timeOnlyToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(entity) = value); timeOnlyToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[240]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToStringConverterProperty, 240), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( index: 240, originalValueIndex: 240, @@ -14650,29 +14409,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeOnly, string>( - (TimeOnly v) => v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", (object)v) : v.ToString("o"), - (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); + string (TimeOnly v) => (v.Ticks % 10000000L == 0L ? string.Format(CultureInfo.InvariantCulture, "{0:HH\\:mm\\:ss}", ((object)(v))) : v.ToString("o")), + TimeOnly (string v) => TimeOnly.Parse(v, CultureInfo.InvariantCulture, DateTimeStyles.None)))); timeOnlyToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); - timeOnlyToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty", "TestNamespace") }); var timeOnlyToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeOnlyToTicksConverterProperty", @@ -14681,20 +14439,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeOnlyToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeOnlyToTicksConverter()); timeOnlyToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); + TimeOnly (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) == default(TimeOnly), + TimeOnly (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(instance) == default(TimeOnly)); timeOnlyToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeOnly value) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(entity) = value); timeOnlyToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[241]); + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeOnlyToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeOnly (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeOnly>(timeOnlyToTicksConverterProperty, 241), + TimeOnly (InternalEntityEntry entry) => entry.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( index: 241, originalValueIndex: 241, @@ -14703,29 +14461,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeOnlyToTicksConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), keyComparer: new ValueComparer<TimeOnly>( - (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), - (TimeOnly v) => ((object)v).GetHashCode(), - (TimeOnly v) => v), + bool (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), + int (TimeOnly v) => ((object)v).GetHashCode(), + TimeOnly (TimeOnly v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)), + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeOnly, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeOnly, long>( - (TimeOnly v) => v.Ticks, - (long v) => new TimeOnly(v)))); + long (TimeOnly v) => v.Ticks, + TimeOnly (long v) => new TimeOnly(v)))); timeOnlyToTicksConverterProperty.SetSentinelFromProviderValue(0L); - timeOnlyToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty", "TestNamespace") }); var timeSpan = runtimeEntityType.AddProperty( "TimeSpan", @@ -14734,20 +14491,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpan>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: new TimeSpan(0, 0, 0, 0, 0)); timeSpan.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpan(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpan(instance) == default(TimeSpan)); timeSpan.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpan(entity) = value); timeSpan.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[242]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpan(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpan, 242), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpan), + object (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( index: 242, originalValueIndex: 242, @@ -14756,20 +14513,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpan.TypeMapping = TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT")); - timeSpan.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan", "TestNamespace") }); var timeSpanArray = runtimeEntityType.AddProperty( "TimeSpanArray", @@ -14777,20 +14533,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("TimeSpanArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); timeSpanArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(instance) == null); + TimeSpan[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) == null, + TimeSpan[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanArray(instance) == null); timeSpanArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan[] value) => ManyTypesUnsafeAccessors.TimeSpanArray(entity) = value); timeSpanArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[243]); + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan[] (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan[]>(timeSpanArray, 243), + TimeSpan[] (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan[]>(timeSpanArray), + object (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( index: 243, originalValueIndex: 243, @@ -14799,37 +14555,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), keyComparer: new ListOfValueTypesComparer<TimeSpan[], TimeSpan>(new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v)), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<TimeSpan>(new JsonCollectionOfStructsReaderWriter<TimeSpan[], TimeSpan>( JsonTimeSpanReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<TimeSpan[], TimeSpan>( JsonTimeSpanReaderWriter.Instance), elementMapping: TimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "TEXT"))); - timeSpanArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray", "TestNamespace") }); var timeSpanToStringConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToStringConverterProperty", @@ -14838,20 +14593,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToStringConverter()); timeSpanToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(instance) == default(TimeSpan)); timeSpanToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(entity) = value); timeSpanToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[244]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToStringConverterProperty, 244), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( index: 244, originalValueIndex: 244, @@ -14860,29 +14615,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 48), converter: new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, string>( JsonStringReaderWriter.Instance, new ValueConverter<TimeSpan, string>( - (TimeSpan v) => v.ToString("c"), - (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); + string (TimeSpan v) => v.ToString("c"), + TimeSpan (string v) => TimeSpan.Parse(v, CultureInfo.InvariantCulture)))); timeSpanToStringConverterProperty.SetSentinelFromProviderValue("00:00:00"); - timeSpanToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty", "TestNamespace") }); var timeSpanToTicksConverterProperty = runtimeEntityType.AddProperty( "TimeSpanToTicksConverterProperty", @@ -14891,20 +14645,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<TimeSpanToTicksConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new TimeSpanToTicksConverter()); timeSpanToTicksConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); + TimeSpan (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) == default(TimeSpan), + TimeSpan (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(instance) == default(TimeSpan)); timeSpanToTicksConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, TimeSpan value) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(entity) = value); timeSpanToTicksConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), - (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[245]); + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.TimeSpanToTicksConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + TimeSpan (InternalEntityEntry entry) => entry.ReadOriginalValue<TimeSpan>(timeSpanToTicksConverterProperty, 245), + TimeSpan (InternalEntityEntry entry) => entry.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( index: 245, originalValueIndex: 245, @@ -14913,29 +14667,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); timeSpanToTicksConverterProperty.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), keyComparer: new ValueComparer<TimeSpan>( - (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), - (TimeSpan v) => ((object)v).GetHashCode(), - (TimeSpan v) => v), + bool (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), + int (TimeSpan v) => ((object)v).GetHashCode(), + TimeSpan (TimeSpan v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)), + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<TimeSpan, long>( JsonInt64ReaderWriter.Instance, new ValueConverter<TimeSpan, long>( - (TimeSpan v) => v.Ticks, - (long v) => new TimeSpan(v)))); + long (TimeSpan v) => v.Ticks, + TimeSpan (long v) => new TimeSpan(v)))); timeSpanToTicksConverterProperty.SetSentinelFromProviderValue(0L); - timeSpanToTicksConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty", "TestNamespace") }); var uInt16 = runtimeEntityType.AddProperty( "UInt16", @@ -14944,20 +14697,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (ushort)0); uInt16.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(instance) == 0); + ushort (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16(entity) == 0, + ushort (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16(instance) == 0); uInt16.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort value) => ManyTypesUnsafeAccessors.UInt16(entity) = value); uInt16.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[246]); + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort>(uInt16, 246), + ushort (InternalEntityEntry entry) => entry.GetCurrentValue<ushort>(uInt16), + object (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( index: 246, originalValueIndex: 246, @@ -14966,20 +14719,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16.TypeMapping = UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt16.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16", "TestNamespace") }); var uInt16Array = runtimeEntityType.AddProperty( "UInt16Array", @@ -14987,20 +14739,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt16Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt16Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt16Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(instance) == null); + ushort[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt16Array(entity) == null, + ushort[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt16Array(instance) == null); uInt16Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ushort[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ushort[] value) => ManyTypesUnsafeAccessors.UInt16Array(entity) = value); uInt16Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), - (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[247]); + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt16Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ushort[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ushort[]>(uInt16Array, 247), + ushort[] (InternalEntityEntry entry) => entry.GetCurrentValue<ushort[]>(uInt16Array), + object (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( index: 247, originalValueIndex: 247, @@ -15009,37 +14761,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt16Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), keyComparer: new ListOfValueTypesComparer<ushort[], ushort>(new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v)), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ushort>(new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( JsonUInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ushort[], ushort>( JsonUInt16ReaderWriter.Instance), elementMapping: UShortTypeMapping.Default.Clone( comparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), keyComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), providerValueComparer: new ValueComparer<ushort>( - (ushort v1, ushort v2) => v1 == v2, - (ushort v) => (int)v, - (ushort v) => v), + bool (ushort v1, ushort v2) => v1 == v2, + int (ushort v) => ((int)(v)), + ushort (ushort v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - uInt16Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array", "TestNamespace") }); var uInt32 = runtimeEntityType.AddProperty( "UInt32", @@ -15048,20 +14799,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0u); uInt32.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) == 0U, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(instance) == 0U); + uint (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32(entity) == 0U, + uint (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32(instance) == 0U); uInt32.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint value) => ManyTypesUnsafeAccessors.UInt32(entity) = value); uInt32.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[248]); + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint (InternalEntityEntry entry) => entry.ReadOriginalValue<uint>(uInt32, 248), + uint (InternalEntityEntry entry) => entry.GetCurrentValue<uint>(uInt32), + object (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( index: 248, originalValueIndex: 248, @@ -15070,20 +14821,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32.TypeMapping = UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt32.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32", "TestNamespace") }); var uInt32Array = runtimeEntityType.AddProperty( "UInt32Array", @@ -15091,20 +14841,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt32Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt32Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt32Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(instance) == null); + uint[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt32Array(entity) == null, + uint[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt32Array(instance) == null); uInt32Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, uint[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, uint[] value) => ManyTypesUnsafeAccessors.UInt32Array(entity) = value); uInt32Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), - (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[249]); + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt32Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + uint[] (InternalEntityEntry entry) => entry.ReadOriginalValue<uint[]>(uInt32Array, 249), + uint[] (InternalEntityEntry entry) => entry.GetCurrentValue<uint[]>(uInt32Array), + object (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( index: 249, originalValueIndex: 249, @@ -15113,37 +14863,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt32Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), keyComparer: new ListOfValueTypesComparer<uint[], uint>(new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v)), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<uint>(new JsonCollectionOfStructsReaderWriter<uint[], uint>( JsonUInt32ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<uint[], uint>( JsonUInt32ReaderWriter.Instance), elementMapping: UIntTypeMapping.Default.Clone( comparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), keyComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), providerValueComparer: new ValueComparer<uint>( - (uint v1, uint v2) => v1 == v2, - (uint v) => (int)v, - (uint v) => v), + bool (uint v1, uint v2) => v1 == v2, + int (uint v) => ((int)(v)), + uint (uint v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - uInt32Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array", "TestNamespace") }); var uInt64 = runtimeEntityType.AddProperty( "UInt64", @@ -15152,20 +14901,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0ul); uInt64.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) == 0UL, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(instance) == 0UL); + ulong (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64(entity) == 0UL, + ulong (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64(instance) == 0UL); uInt64.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong value) => ManyTypesUnsafeAccessors.UInt64(entity) = value); uInt64.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[250]); + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong>(uInt64, 250), + ulong (InternalEntityEntry entry) => entry.GetCurrentValue<ulong>(uInt64), + object (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( index: 250, originalValueIndex: 250, @@ -15173,7 +14922,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); uInt64.TypeMapping = SqliteULongTypeMapping.Default; - uInt64.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64", "TestNamespace") }); var uInt64Array = runtimeEntityType.AddProperty( "UInt64Array", @@ -15181,20 +14929,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt64Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt64Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt64Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(instance) == null); + ulong[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt64Array(entity) == null, + ulong[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt64Array(instance) == null); uInt64Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, ulong[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, ulong[] value) => ManyTypesUnsafeAccessors.UInt64Array(entity) = value); uInt64Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), - (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[251]); + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt64Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + ulong[] (InternalEntityEntry entry) => entry.ReadOriginalValue<ulong[]>(uInt64Array, 251), + ulong[] (InternalEntityEntry entry) => entry.GetCurrentValue<ulong[]>(uInt64Array), + object (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( index: 251, originalValueIndex: 251, @@ -15203,23 +14951,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt64Array.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), keyComparer: new ListOfValueTypesComparer<ulong[], ulong>(new ValueComparer<ulong>( - (ulong v1, ulong v2) => v1 == v2, - (ulong v) => ((object)v).GetHashCode(), - (ulong v) => v)), + bool (ulong v1, ulong v2) => v1 == v2, + int (ulong v) => ((object)v).GetHashCode(), + ulong (ulong v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<ulong>(new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( JsonUInt64ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<ulong[], ulong>( JsonUInt64ReaderWriter.Instance), elementMapping: SqliteULongTypeMapping.Default); - uInt64Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array", "TestNamespace") }); var uInt8 = runtimeEntityType.AddProperty( "UInt8", @@ -15228,20 +14975,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: (byte)0); uInt8.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) == 0, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(instance) == 0); + byte (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8(entity) == 0, + byte (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8(instance) == 0); uInt8.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte value) => ManyTypesUnsafeAccessors.UInt8(entity) = value); uInt8.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[252]); + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte (InternalEntityEntry entry) => entry.ReadOriginalValue<byte>(uInt8, 252), + byte (InternalEntityEntry entry) => entry.GetCurrentValue<byte>(uInt8), + object (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( index: 252, originalValueIndex: 252, @@ -15250,20 +14997,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8.TypeMapping = ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - uInt8.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8", "TestNamespace") }); var uInt8Array = runtimeEntityType.AddProperty( "UInt8Array", @@ -15271,20 +15017,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8Array", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8Array>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8Array.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(instance) == null); + byte[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8Array(entity) == null, + byte[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8Array(instance) == null); uInt8Array.SetSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(entity) = value); + (CompiledModelTestBase.ManyTypes entity, byte[] value) => ManyTypesUnsafeAccessors.UInt8Array(entity) = value); uInt8Array.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[253]); + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8Array(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(uInt8Array, 253), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(uInt8Array), + object (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( index: 253, originalValueIndex: 253, @@ -15293,18 +15039,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8Array.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - uInt8Array.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var uInt8NestedCollection = runtimeEntityType.AddProperty( "UInt8NestedCollection", @@ -15312,20 +15057,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UInt8NestedCollection>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uInt8NestedCollection.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(instance) == null); + List<byte[]> (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) == null, + List<byte[]> (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UInt8NestedCollection(instance) == null); uInt8NestedCollection.SetSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(entity) = value); + (CompiledModelTestBase.ManyTypes entity, List<byte[]> value) => ManyTypesUnsafeAccessors.UInt8NestedCollection(entity) = value); uInt8NestedCollection.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), - (ValueBuffer valueBuffer) => valueBuffer[254]); + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UInt8NestedCollection(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + List<byte[]> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<byte[]>>(uInt8NestedCollection, 254), + List<byte[]> (InternalEntityEntry entry) => entry.GetCurrentValue<List<byte[]>>(uInt8NestedCollection), + object (ValueBuffer valueBuffer) => valueBuffer[254]); uInt8NestedCollection.SetPropertyIndexes( index: 254, originalValueIndex: 254, @@ -15334,35 +15079,34 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uInt8NestedCollection.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<byte[]>, byte[]>(new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v)), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte[]>(new JsonCollectionOfReferencesReaderWriter<List<byte[]>, byte[]>( SqliteJsonByteArrayReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<byte[]>, byte[]>( SqliteJsonByteArrayReaderWriter.Instance), elementMapping: SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()))); - uInt8NestedCollection.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()))); var uri = runtimeEntityType.AddProperty( "Uri", @@ -15370,20 +15114,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Uri", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<Uri>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uri.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.Uri(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.Uri(instance) == null); uri.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.Uri(entity) = value); uri.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), - (ValueBuffer valueBuffer) => valueBuffer[255]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.Uri(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uri, 255), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uri), + object (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( index: 255, originalValueIndex: 255, @@ -15392,26 +15136,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uri.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - uri.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var uriArray = runtimeEntityType.AddProperty( "UriArray", @@ -15419,20 +15162,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UriArray", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); uriArray.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(instance) == null); + Uri[] (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriArray(entity) == null, + Uri[] (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriArray(instance) == null); uriArray.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri[] value) => ManyTypesUnsafeAccessors.UriArray(entity) = value); uriArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[256]); + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriArray(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri[] (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri[]>(uriArray, 256), + Uri[] (InternalEntityEntry entry) => entry.GetCurrentValue<Uri[]>(uriArray), + object (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( index: 256, originalValueIndex: 256, @@ -15441,51 +15184,50 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), keyComparer: new ListOfReferenceTypesComparer<Uri[], Uri>(new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v)), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<Uri>(new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<Uri[], Uri>( new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); - uriArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))); var uriToStringConverterProperty = runtimeEntityType.AddProperty( "UriToStringConverterProperty", @@ -15494,20 +15236,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("<UriToStringConverterProperty>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), valueConverter: new UriToStringConverter()); uriToStringConverterProperty.SetGetter( - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity), - (CompiledModelTestBase.ManyTypes entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) == null, - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance), - (CompiledModelTestBase.ManyTypes instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(instance) == null); + Uri (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity), + bool (CompiledModelTestBase.ManyTypes entity) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) == null, + Uri (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance), + bool (CompiledModelTestBase.ManyTypes instance) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(instance) == null); uriToStringConverterProperty.SetSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetMaterializationSetter( - (CompiledModelTestBase.ManyTypes entity, Uri value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(entity) = value); + (CompiledModelTestBase.ManyTypes entity, Uri value) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(entity) = value); uriToStringConverterProperty.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), - (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[257]); + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => ManyTypesUnsafeAccessors.UriToStringConverterProperty(((CompiledModelTestBase.ManyTypes)(entry.Entity))), + Uri (InternalEntityEntry entry) => entry.ReadOriginalValue<Uri>(uriToStringConverterProperty, 257), + Uri (InternalEntityEntry entry) => entry.GetCurrentValue<Uri>(uriToStringConverterProperty), + object (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( index: 257, originalValueIndex: 257, @@ -15516,26 +15258,25 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); uriToStringConverterProperty.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), keyComparer: new ValueComparer<Uri>( - (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (Uri v) => ((object)v).GetHashCode(), - (Uri v) => v), + bool (Uri v1, Uri v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (Uri v) => ((object)v).GetHashCode(), + Uri (Uri v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<Uri, string>( JsonStringReaderWriter.Instance, new ValueConverter<Uri, string>( - (Uri v) => ((object)v).ToString(), - (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); - uriToStringConverterProperty.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("ManyTypesEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty", "TestNamespace") }); + string (Uri v) => ((object)v).ToString(), + Uri (string v) => new Uri(v, UriKind.RelativeOrAbsolute)))); var key = runtimeEntityType.AddKey( new[] { id }); @@ -15808,40 +15549,40 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<CompiledModelTestBase.ManyTypesId>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<CompiledModelTestBase.ManyTypesId>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)((IProperty)@bool).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(@bool)), (IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray) == null ? null : (bool[])((ValueComparer<IEnumerable<bool>>)((IProperty)boolArray).GetValueComparer()).Snapshot((IEnumerable<bool>)source.GetCurrentValue<bool[]>(boolArray)), (object)source.GetCurrentValue<bool[][]>(boolNestedCollection) == null ? null : (bool[][])((ValueComparer<object>)((IProperty)boolNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<bool[][]>(boolNestedCollection)), ((ValueComparer<bool>)((IProperty)boolToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToTwoValuesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)((IProperty)boolToZeroOneConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytes)), (object)source.GetCurrentValue<byte[][]>(bytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)bytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(bytesArray)), (object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)bytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(bytesNestedCollection)), source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)((IProperty)bytesToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty)), ((ValueComparer<int>)((IProperty)castingConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)((IProperty)@char).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(@char)), (IEnumerable<char>)source.GetCurrentValue<char[]>(charArray) == null ? null : (char[])((ValueComparer<IEnumerable<char>>)((IProperty)charArray).GetValueComparer()).Snapshot((IEnumerable<char>)source.GetCurrentValue<char[]>(charArray)), (object)source.GetCurrentValue<char[][]>(charNestedCollection) == null ? null : (char[][])((ValueComparer<object>)((IProperty)charNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<char[][]>(charNestedCollection)), ((ValueComparer<char>)((IProperty)charToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)((IProperty)dateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer<IEnumerable<DateOnly>>)((IProperty)dateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<DateOnly>)source.GetCurrentValue<DateOnly[]>(dateOnlyArray)), ((ValueComparer<DateOnly>)((IProperty)dateOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)dateTimeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(dateTimeArray)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)((IProperty)dateTimeToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)((IProperty)@decimal).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray) == null ? null : (decimal[])((ValueComparer<IEnumerable<decimal>>)((IProperty)decimalArray).GetValueComparer()).Snapshot((IEnumerable<decimal>)source.GetCurrentValue<decimal[]>(decimalArray)), ((ValueComparer<decimal>)((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))); - var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)((IProperty)decimalNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)((IProperty)@double).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(@double)), (IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray) == null ? null : (double[])((ValueComparer<IEnumerable<double>>)((IProperty)doubleArray).GetValueComparer()).Snapshot((IEnumerable<double>)source.GetCurrentValue<double[]>(doubleArray)), ((ValueComparer<double>)((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)((IProperty)doubleNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array)), ((ValueComparer<CompiledModelTestBase.Enum16>)((IProperty)enum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection) == null ? null : (List<CompiledModelTestBase.Enum16>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)((IProperty)enum16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum16>)source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection) == null ? null : (List<CompiledModelTestBase.Enum32>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)((IProperty)enum32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum32>)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection)), (object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection) == null ? null : (List<CompiledModelTestBase.Enum32>[][])((ValueComparer<object>)((IProperty)enum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array)), ((ValueComparer<CompiledModelTestBase.Enum64>)((IProperty)enum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection) == null ? null : (List<CompiledModelTestBase.Enum64>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)((IProperty)enum64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum64>)source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array)), ((ValueComparer<CompiledModelTestBase.Enum8>)((IProperty)enum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection)), (IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection) == null ? null : (List<CompiledModelTestBase.Enum8>)((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)((IProperty)enum8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.Enum8>)source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))); - var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer<object>)((IProperty)enum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)((IProperty)enumToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array)), ((ValueComparer<CompiledModelTestBase.EnumU16>)((IProperty)enumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection) == null ? null : (List<CompiledModelTestBase.EnumU16>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)((IProperty)enumU16Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU16>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array)), ((ValueComparer<CompiledModelTestBase.EnumU32>)((IProperty)enumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection) == null ? null : (List<CompiledModelTestBase.EnumU32>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)((IProperty)enumU32Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU32>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array)), ((ValueComparer<CompiledModelTestBase.EnumU64>)((IProperty)enumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection) == null ? null : (List<CompiledModelTestBase.EnumU64>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)((IProperty)enumU64Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU64>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection)), (object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer<object>)((IProperty)enumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Array).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array)), ((ValueComparer<CompiledModelTestBase.EnumU8>)((IProperty)enumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection)), (IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection) == null ? null : (List<CompiledModelTestBase.EnumU8>)((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)((IProperty)enumU8Collection).GetValueComparer()).Snapshot((IEnumerable<CompiledModelTestBase.EnumU8>)source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection)), ((ValueComparer<float>)((IProperty)@float).GetValueComparer()).Snapshot(source.GetCurrentValue<float>(@float)), (IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray) == null ? null : (float[])((ValueComparer<IEnumerable<float>>)((IProperty)floatArray).GetValueComparer()).Snapshot((IEnumerable<float>)source.GetCurrentValue<float[]>(floatArray))); - var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, Nullable<int>, Nullable<bool>, Nullable<bool>[], byte[], byte[][], byte[][][], Nullable<char>, Nullable<char>[]>(((ValueComparer<Guid>)((IProperty)guid).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guid)), (IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray) == null ? null : (Guid[])((ValueComparer<IEnumerable<Guid>>)((IProperty)guidArray).GetValueComparer()).Snapshot((IEnumerable<Guid>)source.GetCurrentValue<Guid[]>(guidArray)), (object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection) == null ? null : (ICollection<Guid[][]>)((ValueComparer<object>)((IProperty)guidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection)), ((ValueComparer<Guid>)((IProperty)guidToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)((IProperty)guidToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress)), (object)source.GetCurrentValue<IPAddress[]>(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)iPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(iPAddressArray)), source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty)), source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)((IProperty)iPAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty)), ((ValueComparer<short>)((IProperty)int16).GetValueComparer()).Snapshot(source.GetCurrentValue<short>(int16)), (IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array) == null ? null : (short[])((ValueComparer<IEnumerable<short>>)((IProperty)int16Array).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<short[]>(int16Array)), ((ValueComparer<int>)((IProperty)int32).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(int32)), (IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array) == null ? null : (int[])((ValueComparer<IEnumerable<int>>)((IProperty)int32Array).GetValueComparer()).Snapshot((IEnumerable<int>)source.GetCurrentValue<int[]>(int32Array)), (object)source.GetCurrentValue<int[][]>(int32NestedCollection) == null ? null : (int[][])((ValueComparer<object>)((IProperty)int32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<int[][]>(int32NestedCollection)), ((ValueComparer<long>)((IProperty)int64).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(int64)), (IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array) == null ? null : (long[])((ValueComparer<IEnumerable<long>>)((IProperty)int64Array).GetValueComparer()).Snapshot((IEnumerable<long>)source.GetCurrentValue<long[]>(int64Array)), (object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection) == null ? null : (IList<long[]>[])((ValueComparer<object>)((IProperty)int64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection)), ((ValueComparer<sbyte>)((IProperty)int8).GetValueComparer()).Snapshot(source.GetCurrentValue<sbyte>(int8)), (IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array) == null ? null : (sbyte[])((ValueComparer<IEnumerable<sbyte>>)((IProperty)int8Array).GetValueComparer()).Snapshot((IEnumerable<sbyte>)source.GetCurrentValue<sbyte[]>(int8Array)), (object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer<object>)((IProperty)int8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<sbyte[][][]>(int8NestedCollection)), ((ValueComparer<int>)((IProperty)intNumberToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)((IProperty)intNumberToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullIntToNullStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullIntToNullStringConverterProperty)), source.GetCurrentValue<Nullable<bool>>(nullableBool) == null ? null : ((ValueComparer<Nullable<bool>>)((IProperty)nullableBool).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<bool>>(nullableBool)), (IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray) == null ? null : (Nullable<bool>[])((ValueComparer<IEnumerable<Nullable<bool>>>)((IProperty)nullableBoolArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<bool>>)source.GetCurrentValue<Nullable<bool>[]>(nullableBoolArray)), source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)((IProperty)nullableBytes).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes)), (object)source.GetCurrentValue<byte[][]>(nullableBytesArray) == null ? null : (byte[][])((ValueComparer<object>)((IProperty)nullableBytesArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][]>(nullableBytesArray)), (object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer<object>)((IProperty)nullableBytesNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection)), source.GetCurrentValue<Nullable<char>>(nullableChar) == null ? null : ((ValueComparer<Nullable<char>>)((IProperty)nullableChar).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<char>>(nullableChar)), (IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray) == null ? null : (Nullable<char>[])((ValueComparer<IEnumerable<Nullable<char>>>)((IProperty)nullableCharArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<char>>)source.GetCurrentValue<Nullable<char>[]>(nullableCharArray))); - var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot<Nullable<DateOnly>, Nullable<DateOnly>[], Nullable<DateTime>, Nullable<DateTime>[], Nullable<decimal>, Nullable<decimal>[], Nullable<double>, Nullable<double>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], Nullable<CompiledModelTestBase.Enum16>, Nullable<CompiledModelTestBase.Enum16>[], List<Nullable<CompiledModelTestBase.Enum16>>, List<Nullable<CompiledModelTestBase.Enum16>>, Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], Nullable<CompiledModelTestBase.Enum32>, Nullable<CompiledModelTestBase.Enum32>[], List<Nullable<CompiledModelTestBase.Enum32>>, List<Nullable<CompiledModelTestBase.Enum32>>, Nullable<CompiledModelTestBase.Enum32>[][][], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], Nullable<CompiledModelTestBase.Enum64>, Nullable<CompiledModelTestBase.Enum64>[], List<Nullable<CompiledModelTestBase.Enum64>>, List<Nullable<CompiledModelTestBase.Enum64>>, Nullable<CompiledModelTestBase.Enum8>, Nullable<CompiledModelTestBase.Enum8>[], Nullable<CompiledModelTestBase.Enum8>>(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly) == null ? null : ((ValueComparer<Nullable<DateOnly>>)((IProperty)nullableDateOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateOnly>>(nullableDateOnly)), (IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray) == null ? null : (Nullable<DateOnly>[])((ValueComparer<IEnumerable<Nullable<DateOnly>>>)((IProperty)nullableDateOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateOnly>>)source.GetCurrentValue<Nullable<DateOnly>[]>(nullableDateOnlyArray)), source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime) == null ? null : ((ValueComparer<Nullable<DateTime>>)((IProperty)nullableDateTime).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<DateTime>>(nullableDateTime)), (IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray) == null ? null : (Nullable<DateTime>[])((ValueComparer<IEnumerable<Nullable<DateTime>>>)((IProperty)nullableDateTimeArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<DateTime>>)source.GetCurrentValue<Nullable<DateTime>[]>(nullableDateTimeArray)), source.GetCurrentValue<Nullable<decimal>>(nullableDecimal) == null ? null : ((ValueComparer<Nullable<decimal>>)((IProperty)nullableDecimal).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<decimal>>(nullableDecimal)), (IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray) == null ? null : (Nullable<decimal>[])((ValueComparer<IEnumerable<Nullable<decimal>>>)((IProperty)nullableDecimalArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<decimal>>)source.GetCurrentValue<Nullable<decimal>[]>(nullableDecimalArray)), source.GetCurrentValue<Nullable<double>>(nullableDouble) == null ? null : ((ValueComparer<Nullable<double>>)((IProperty)nullableDouble).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<double>>(nullableDouble)), (IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray) == null ? null : (Nullable<double>[])((ValueComparer<IEnumerable<Nullable<double>>>)((IProperty)nullableDoubleArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<double>>)source.GetCurrentValue<Nullable<double>[]>(nullableDoubleArray)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum16>>)((IProperty)nullableEnum16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>>(nullableEnum16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum16>[]>(nullableEnum16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum16>>>)((IProperty)nullableEnum16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum16>>>(nullableEnum16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum32>>)((IProperty)nullableEnum32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>>(nullableEnum32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[]>(nullableEnum32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum32>>>)((IProperty)nullableEnum32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum32>>>(nullableEnum32Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum32>[][][])((ValueComparer<object>)((IProperty)nullableEnum32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum32>[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum64>>)((IProperty)nullableEnum64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>>(nullableEnum64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum64>[]>(nullableEnum64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum64>>>)((IProperty)nullableEnum64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum64>>>(nullableEnum64Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.Enum8>>)((IProperty)nullableEnum8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>>(nullableEnum8AsString))); - var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot<Nullable<CompiledModelTestBase.Enum8>[], List<Nullable<CompiledModelTestBase.Enum8>>, List<Nullable<CompiledModelTestBase.Enum8>>, Nullable<CompiledModelTestBase.Enum8>[][], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], Nullable<CompiledModelTestBase.EnumU16>, Nullable<CompiledModelTestBase.EnumU16>[], List<Nullable<CompiledModelTestBase.EnumU16>>, List<Nullable<CompiledModelTestBase.EnumU16>>, Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], Nullable<CompiledModelTestBase.EnumU32>, Nullable<CompiledModelTestBase.EnumU32>[], List<Nullable<CompiledModelTestBase.EnumU32>>, List<Nullable<CompiledModelTestBase.EnumU32>>, Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], Nullable<CompiledModelTestBase.EnumU64>, Nullable<CompiledModelTestBase.EnumU64>[], List<Nullable<CompiledModelTestBase.EnumU64>>, List<Nullable<CompiledModelTestBase.EnumU64>>, Nullable<CompiledModelTestBase.EnumU64>[][], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], Nullable<CompiledModelTestBase.EnumU8>, Nullable<CompiledModelTestBase.EnumU8>[], List<Nullable<CompiledModelTestBase.EnumU8>>, List<Nullable<CompiledModelTestBase.EnumU8>>, Nullable<float>>((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[]>(nullableEnum8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.Enum8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.Enum8>>>)((IProperty)nullableEnum8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.Enum8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.Enum8>>>(nullableEnum8Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.Enum8>[][])((ValueComparer<object>)((IProperty)nullableEnum8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.Enum8>[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU16>>)((IProperty)nullableEnumU16AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>>(nullableEnumU16AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU16>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU16>[]>(nullableEnumU16AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU16>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>>)((IProperty)nullableEnumU16Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU16>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU16>>>(nullableEnumU16Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU32>>)((IProperty)nullableEnumU32AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>>(nullableEnumU32AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU32>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU32>[]>(nullableEnumU32AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU32>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>>)((IProperty)nullableEnumU32Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU32>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU32>>>(nullableEnumU32Collection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU64>>)((IProperty)nullableEnumU64AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>>(nullableEnumU64AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[]>(nullableEnumU64AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU64>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>>)((IProperty)nullableEnumU64Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU64>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU64>>>(nullableEnumU64Collection)), (object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable<CompiledModelTestBase.EnumU64>[][])((ValueComparer<object>)((IProperty)nullableEnumU64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU64>[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8Array)), source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.EnumU8>>)((IProperty)nullableEnumU8AsString).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>>(nullableEnumU8AsString)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable<CompiledModelTestBase.EnumU8>[])((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<Nullable<CompiledModelTestBase.EnumU8>[]>(nullableEnumU8AsStringArray)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8AsStringCollection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8AsStringCollection)), (IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection) == null ? null : (List<Nullable<CompiledModelTestBase.EnumU8>>)((ValueComparer<IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>>)((IProperty)nullableEnumU8Collection).GetValueComparer()).Snapshot((IEnumerable<Nullable<CompiledModelTestBase.EnumU8>>)source.GetCurrentValue<List<Nullable<CompiledModelTestBase.EnumU8>>>(nullableEnumU8Collection)), source.GetCurrentValue<Nullable<float>>(nullableFloat) == null ? null : ((ValueComparer<Nullable<float>>)((IProperty)nullableFloat).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<float>>(nullableFloat))); - var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot<Nullable<float>[], Nullable<Guid>, Nullable<Guid>[], Nullable<Guid>[][], IPAddress, IPAddress[], Nullable<short>, Nullable<short>[], Nullable<int>, Nullable<int>[], Nullable<int>[][], Nullable<long>, Nullable<long>[], List<Nullable<long>[][]>, Nullable<sbyte>, Nullable<sbyte>[], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], Nullable<TimeOnly>, Nullable<TimeOnly>[], Nullable<TimeSpan>, Nullable<TimeSpan>[], Nullable<ushort>, Nullable<ushort>[], Nullable<uint>, Nullable<uint>[]>((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray) == null ? null : (Nullable<float>[])((ValueComparer<IEnumerable<Nullable<float>>>)((IProperty)nullableFloatArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<float>>)source.GetCurrentValue<Nullable<float>[]>(nullableFloatArray)), source.GetCurrentValue<Nullable<Guid>>(nullableGuid) == null ? null : ((ValueComparer<Nullable<Guid>>)((IProperty)nullableGuid).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<Guid>>(nullableGuid)), (IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray) == null ? null : (Nullable<Guid>[])((ValueComparer<IEnumerable<Nullable<Guid>>>)((IProperty)nullableGuidArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<Guid>>)source.GetCurrentValue<Nullable<Guid>[]>(nullableGuidArray)), (object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection) == null ? null : (Nullable<Guid>[][])((ValueComparer<object>)((IProperty)nullableGuidNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<Guid>[][]>(nullableGuidNestedCollection)), source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)((IProperty)nullableIPAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress)), (object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)nullableIPAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray)), source.GetCurrentValue<Nullable<short>>(nullableInt16) == null ? null : ((ValueComparer<Nullable<short>>)((IProperty)nullableInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<short>>(nullableInt16)), (IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array) == null ? null : (Nullable<short>[])((ValueComparer<IEnumerable<Nullable<short>>>)((IProperty)nullableInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<short>>)source.GetCurrentValue<Nullable<short>[]>(nullableInt16Array)), source.GetCurrentValue<Nullable<int>>(nullableInt32) == null ? null : ((ValueComparer<Nullable<int>>)((IProperty)nullableInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<int>>(nullableInt32)), (IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array) == null ? null : (Nullable<int>[])((ValueComparer<IEnumerable<Nullable<int>>>)((IProperty)nullableInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<int>>)source.GetCurrentValue<Nullable<int>[]>(nullableInt32Array)), (object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection) == null ? null : (Nullable<int>[][])((ValueComparer<object>)((IProperty)nullableInt32NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<int>[][]>(nullableInt32NestedCollection)), source.GetCurrentValue<Nullable<long>>(nullableInt64) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)nullableInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(nullableInt64)), (IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array) == null ? null : (Nullable<long>[])((ValueComparer<IEnumerable<Nullable<long>>>)((IProperty)nullableInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<long>>)source.GetCurrentValue<Nullable<long>[]>(nullableInt64Array)), (object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection) == null ? null : (List<Nullable<long>[][]>)((ValueComparer<object>)((IProperty)nullableInt64NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<Nullable<long>[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue<Nullable<sbyte>>(nullableInt8) == null ? null : ((ValueComparer<Nullable<sbyte>>)((IProperty)nullableInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<sbyte>>(nullableInt8)), (IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array) == null ? null : (Nullable<sbyte>[])((ValueComparer<IEnumerable<Nullable<sbyte>>>)((IProperty)nullableInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<sbyte>>)source.GetCurrentValue<Nullable<sbyte>[]>(nullableInt8Array)), source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)nullablePhysicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)nullablePhysicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray)), (object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable<PhysicalAddress[][]>)((ValueComparer<object>)((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)((IProperty)nullableString).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(nullableString)), (object)source.GetCurrentValue<string[]>(nullableStringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)nullableStringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(nullableStringArray)), (object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)nullableStringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(nullableStringNestedCollection)), source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly) == null ? null : ((ValueComparer<Nullable<TimeOnly>>)((IProperty)nullableTimeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeOnly>>(nullableTimeOnly)), (IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray) == null ? null : (Nullable<TimeOnly>[])((ValueComparer<IEnumerable<Nullable<TimeOnly>>>)((IProperty)nullableTimeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeOnly>>)source.GetCurrentValue<Nullable<TimeOnly>[]>(nullableTimeOnlyArray)), source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan) == null ? null : ((ValueComparer<Nullable<TimeSpan>>)((IProperty)nullableTimeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<TimeSpan>>(nullableTimeSpan)), (IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray) == null ? null : (Nullable<TimeSpan>[])((ValueComparer<IEnumerable<Nullable<TimeSpan>>>)((IProperty)nullableTimeSpanArray).GetValueComparer()).Snapshot((IEnumerable<Nullable<TimeSpan>>)source.GetCurrentValue<Nullable<TimeSpan>[]>(nullableTimeSpanArray)), source.GetCurrentValue<Nullable<ushort>>(nullableUInt16) == null ? null : ((ValueComparer<Nullable<ushort>>)((IProperty)nullableUInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ushort>>(nullableUInt16)), (IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array) == null ? null : (Nullable<ushort>[])((ValueComparer<IEnumerable<Nullable<ushort>>>)((IProperty)nullableUInt16Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ushort>>)source.GetCurrentValue<Nullable<ushort>[]>(nullableUInt16Array)), source.GetCurrentValue<Nullable<uint>>(nullableUInt32) == null ? null : ((ValueComparer<Nullable<uint>>)((IProperty)nullableUInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<uint>>(nullableUInt32)), (IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array) == null ? null : (Nullable<uint>[])((ValueComparer<IEnumerable<Nullable<uint>>>)((IProperty)nullableUInt32Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<uint>>)source.GetCurrentValue<Nullable<uint>[]>(nullableUInt32Array))); - var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg6 = (ISnapshot)new Snapshot<Nullable<ulong>, Nullable<ulong>[], Nullable<byte>, Nullable<byte>[], Nullable<byte>[][], 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<Nullable<ulong>>(nullableUInt64) == null ? null : ((ValueComparer<Nullable<ulong>>)((IProperty)nullableUInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<ulong>>(nullableUInt64)), (IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array) == null ? null : (Nullable<ulong>[])((ValueComparer<IEnumerable<Nullable<ulong>>>)((IProperty)nullableUInt64Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<ulong>>)source.GetCurrentValue<Nullable<ulong>[]>(nullableUInt64Array)), source.GetCurrentValue<Nullable<byte>>(nullableUInt8) == null ? null : ((ValueComparer<Nullable<byte>>)((IProperty)nullableUInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<byte>>(nullableUInt8)), (IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array) == null ? null : (Nullable<byte>[])((ValueComparer<IEnumerable<Nullable<byte>>>)((IProperty)nullableUInt8Array).GetValueComparer()).Snapshot((IEnumerable<Nullable<byte>>)source.GetCurrentValue<Nullable<byte>[]>(nullableUInt8Array)), (object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable<byte>[][])((ValueComparer<object>)((IProperty)nullableUInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Nullable<byte>[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)((IProperty)nullableUri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(nullableUri)), (object)source.GetCurrentValue<Uri[]>(nullableUriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)nullableUriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(nullableUriArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddress).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress)), (object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer<object>)((IProperty)physicalAddressArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty)), source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)((IProperty)physicalAddressToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty)), source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)((IProperty)@string).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(@string)), (object)source.GetCurrentValue<string[]>(stringArray) == null ? null : (string[])((ValueComparer<object>)((IProperty)stringArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[]>(stringArray)), (object)source.GetCurrentValue<string[][]>(stringNestedCollection) == null ? null : (string[][])((ValueComparer<object>)((IProperty)stringNestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<string[][]>(stringNestedCollection)), source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBoolConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty)), source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToBytesConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty)), source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToCharConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty)), source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty)), source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty)), source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty)), source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToEnumConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty)), source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToGuidConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty)), source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToIntNumberConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty)), source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty)), source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToTimeSpanConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty)), source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)((IProperty)stringToUriConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnly).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer<IEnumerable<TimeOnly>>)((IProperty)timeOnlyArray).GetValueComparer()).Snapshot((IEnumerable<TimeOnly>)source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))); - var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)((IProperty)timeOnlyToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpan).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer<IEnumerable<TimeSpan>>)((IProperty)timeSpanArray).GetValueComparer()).Snapshot((IEnumerable<TimeSpan>)source.GetCurrentValue<TimeSpan[]>(timeSpanArray)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)((IProperty)timeSpanToTicksConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)((IProperty)uInt16).GetValueComparer()).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array) == null ? null : (ushort[])((ValueComparer<IEnumerable<ushort>>)((IProperty)uInt16Array).GetValueComparer()).Snapshot((IEnumerable<ushort>)source.GetCurrentValue<ushort[]>(uInt16Array)), ((ValueComparer<uint>)((IProperty)uInt32).GetValueComparer()).Snapshot(source.GetCurrentValue<uint>(uInt32)), (IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array) == null ? null : (uint[])((ValueComparer<IEnumerable<uint>>)((IProperty)uInt32Array).GetValueComparer()).Snapshot((IEnumerable<uint>)source.GetCurrentValue<uint[]>(uInt32Array)), ((ValueComparer<ulong>)((IProperty)uInt64).GetValueComparer()).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array) == null ? null : (ulong[])((ValueComparer<IEnumerable<ulong>>)((IProperty)uInt64Array).GetValueComparer()).Snapshot((IEnumerable<ulong>)source.GetCurrentValue<ulong[]>(uInt64Array)), ((ValueComparer<byte>)((IProperty)uInt8).GetValueComparer()).Snapshot(source.GetCurrentValue<byte>(uInt8)), source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)((IProperty)uInt8Array).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array)), (object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection) == null ? null : (List<byte[]>)((ValueComparer<object>)((IProperty)uInt8NestedCollection).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection)), source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)((IProperty)uri).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uri)), (object)source.GetCurrentValue<Uri[]>(uriArray) == null ? null : (Uri[])((ValueComparer<object>)((IProperty)uriArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<Uri[]>(uriArray)), source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)((IProperty)uriToStringConverterProperty).GetValueComparer()).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty))) }); + var entity = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg = ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId, bool, bool[], bool[][], bool, bool, bool, byte[], byte[][], byte[][][], byte[], int, char, char[], char[][], char, DateOnly, DateOnly[], DateOnly, DateTime, DateTime[], DateTimeOffset, DateTimeOffset, DateTimeOffset, DateTime, DateTime, DateTime, decimal, decimal[], decimal>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id)), ((ValueComparer<bool>)(((IProperty)@bool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(@bool)), (((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))) == null ? null : ((bool[])(((ValueComparer<IEnumerable<bool>>)(((IProperty)boolArray).GetValueComparer())).Snapshot(((IEnumerable<bool>)(source.GetCurrentValue<bool[]>(boolArray))))))), (((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))) == null ? null : ((bool[][])(((ValueComparer<object>)(((IProperty)boolNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<bool[][]>(boolNestedCollection))))))), ((ValueComparer<bool>)(((IProperty)boolToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToStringConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToTwoValuesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToTwoValuesConverterProperty)), ((ValueComparer<bool>)(((IProperty)boolToZeroOneConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<bool>(boolToZeroOneConverterProperty)), (source.GetCurrentValue<byte[]>(bytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytes))), (((object)(source.GetCurrentValue<byte[][]>(bytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)bytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(bytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)bytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(bytesNestedCollection))))))), (source.GetCurrentValue<byte[]>(bytesToStringConverterProperty) == null ? null : ((ValueComparer<byte[]>)(((IProperty)bytesToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(bytesToStringConverterProperty))), ((ValueComparer<int>)(((IProperty)castingConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(castingConverterProperty)), ((ValueComparer<char>)(((IProperty)@char).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(@char)), (((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))) == null ? null : ((char[])(((ValueComparer<IEnumerable<char>>)(((IProperty)charArray).GetValueComparer())).Snapshot(((IEnumerable<char>)(source.GetCurrentValue<char[]>(charArray))))))), (((object)(source.GetCurrentValue<char[][]>(charNestedCollection))) == null ? null : ((char[][])(((ValueComparer<object>)(((IProperty)charNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<char[][]>(charNestedCollection))))))), ((ValueComparer<char>)(((IProperty)charToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<char>(charToStringConverterProperty)), ((ValueComparer<DateOnly>)(((IProperty)dateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnly)), (((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))) == null ? null : ((DateOnly[])(((ValueComparer<IEnumerable<DateOnly>>)(((IProperty)dateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly>)(source.GetCurrentValue<DateOnly[]>(dateOnlyArray))))))), ((ValueComparer<DateOnly>)(((IProperty)dateOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly>(dateOnlyToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTime)), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)dateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(dateTimeArray))))))), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer<DateTimeOffset>)(((IProperty)dateTimeOffsetToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTimeOffset>(dateTimeOffsetToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToBinaryConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToBinaryConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToStringConverterProperty)), ((ValueComparer<DateTime>)(((IProperty)dateTimeToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime>(dateTimeToTicksConverterProperty)), ((ValueComparer<decimal>)(((IProperty)@decimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(@decimal)), (((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))) == null ? null : ((decimal[])(((ValueComparer<IEnumerable<decimal>>)(((IProperty)decimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal>)(source.GetCurrentValue<decimal[]>(decimalArray))))))), ((ValueComparer<decimal>)(((IProperty)decimalNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToBytesConverterProperty))))); + var entity0 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg0 = ((ISnapshot)(new Snapshot<decimal, double, double[], double, double, CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], CompiledModelTestBase.Enum16, CompiledModelTestBase.Enum16[], List<CompiledModelTestBase.Enum16>, List<CompiledModelTestBase.Enum16>, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>, List<CompiledModelTestBase.Enum32>[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List<CompiledModelTestBase.Enum64>, List<CompiledModelTestBase.Enum64>, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List<CompiledModelTestBase.Enum8>, List<CompiledModelTestBase.Enum8>>(((ValueComparer<decimal>)(((IProperty)decimalNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal>(decimalNumberToStringConverterProperty)), ((ValueComparer<double>)(((IProperty)@double).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(@double)), (((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))) == null ? null : ((double[])(((ValueComparer<IEnumerable<double>>)(((IProperty)doubleArray).GetValueComparer())).Snapshot(((IEnumerable<double>)(source.GetCurrentValue<double[]>(doubleArray))))))), ((ValueComparer<double>)(((IProperty)doubleNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToBytesConverterProperty)), ((ValueComparer<double>)(((IProperty)doubleNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<double>(doubleNumberToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16Array))))))), ((ValueComparer<CompiledModelTestBase.Enum16>)(((IProperty)enum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16>(enum16AsString)), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<CompiledModelTestBase.Enum16[]>(enum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16>>)(((IProperty)enum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16>>(enum16Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32Array))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enum32AsString)), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<CompiledModelTestBase.Enum32[]>(enum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32>>)(((IProperty)enum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>>(enum32Collection))))))), (((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32>[][])(((ValueComparer<object>)(((IProperty)enum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32>[][]>(enum32NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64Array))))))), ((ValueComparer<CompiledModelTestBase.Enum64>)(((IProperty)enum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64>(enum64AsString)), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<CompiledModelTestBase.Enum64[]>(enum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64>>)(((IProperty)enum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64>>(enum64Collection))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8Array))))))), ((ValueComparer<CompiledModelTestBase.Enum8>)(((IProperty)enum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8>(enum8AsString)), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<CompiledModelTestBase.Enum8[]>(enum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8>>)(((IProperty)enum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8>>(enum8Collection)))))))))); + var entity1 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg1 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8[][], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[], List<CompiledModelTestBase.EnumU16>, List<CompiledModelTestBase.EnumU16>, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List<CompiledModelTestBase.EnumU32>, List<CompiledModelTestBase.EnumU32>, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List<CompiledModelTestBase.EnumU64>, List<CompiledModelTestBase.EnumU64>, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List<CompiledModelTestBase.EnumU8>, List<CompiledModelTestBase.EnumU8>, float, float[]>((((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8[][])(((ValueComparer<object>)(((IProperty)enum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8[][]>(enum8NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToNumberConverterProperty)), ((ValueComparer<CompiledModelTestBase.Enum32>)(((IProperty)enumToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32>(enumToStringConverterProperty)), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU16>)(((IProperty)enumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16>(enumU16AsString)), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16[]>(enumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16>>)(((IProperty)enumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16>>(enumU16Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU32>)(((IProperty)enumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32>(enumU32AsString)), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32[]>(enumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32>>)(((IProperty)enumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32>>(enumU32Collection))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU64>)(((IProperty)enumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64>(enumU64AsString)), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[]>(enumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64>>)(((IProperty)enumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64>>(enumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64[][])(((ValueComparer<object>)(((IProperty)enumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64[][]>(enumU64NestedCollection))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8Array))))))), ((ValueComparer<CompiledModelTestBase.EnumU8>)(((IProperty)enumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8>(enumU8AsString)), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8[])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8[]>(enumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8>>)(((IProperty)enumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8>>(enumU8Collection))))))), ((ValueComparer<float>)(((IProperty)@float).GetValueComparer())).Snapshot(source.GetCurrentValue<float>(@float)), (((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray))) == null ? null : ((float[])(((ValueComparer<IEnumerable<float>>)(((IProperty)floatArray).GetValueComparer())).Snapshot(((IEnumerable<float>)(source.GetCurrentValue<float[]>(floatArray)))))))))); + var entity2 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg2 = ((ISnapshot)(new Snapshot<Guid, Guid[], ICollection<Guid[][]>, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList<long[]>[], sbyte, sbyte[], sbyte[][][], int, int, int?, bool?, bool? [], byte[], byte[][], byte[][][], char?, char? []>(((ValueComparer<Guid>)(((IProperty)guid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guid)), (((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))) == null ? null : ((Guid[])(((ValueComparer<IEnumerable<Guid>>)(((IProperty)guidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid>)(source.GetCurrentValue<Guid[]>(guidArray))))))), (((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))) == null ? null : ((ICollection<Guid[][]>)(((ValueComparer<object>)(((IProperty)guidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<ICollection<Guid[][]>>(guidNestedCollection))))))), ((ValueComparer<Guid>)(((IProperty)guidToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToBytesConverterProperty)), ((ValueComparer<Guid>)(((IProperty)guidToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(guidToStringConverterProperty)), (source.GetCurrentValue<IPAddress>(iPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)iPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(iPAddressArray))))))), (source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToBytesConverterProperty))), (source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)iPAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(iPAddressToStringConverterProperty))), ((ValueComparer<short>)(((IProperty)int16).GetValueComparer())).Snapshot(source.GetCurrentValue<short>(int16)), (((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))) == null ? null : ((short[])(((ValueComparer<IEnumerable<short>>)(((IProperty)int16Array).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<short[]>(int16Array))))))), ((ValueComparer<int>)(((IProperty)int32).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(int32)), (((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))) == null ? null : ((int[])(((ValueComparer<IEnumerable<int>>)(((IProperty)int32Array).GetValueComparer())).Snapshot(((IEnumerable<int>)(source.GetCurrentValue<int[]>(int32Array))))))), (((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))) == null ? null : ((int[][])(((ValueComparer<object>)(((IProperty)int32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int[][]>(int32NestedCollection))))))), ((ValueComparer<long>)(((IProperty)int64).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(int64)), (((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))) == null ? null : ((long[])(((ValueComparer<IEnumerable<long>>)(((IProperty)int64Array).GetValueComparer())).Snapshot(((IEnumerable<long>)(source.GetCurrentValue<long[]>(int64Array))))))), (((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))) == null ? null : ((IList<long[]>[])(((ValueComparer<object>)(((IProperty)int64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<long[]>[]>(int64NestedCollection))))))), ((ValueComparer<sbyte>)(((IProperty)int8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte>(int8)), (((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))) == null ? null : ((sbyte[])(((ValueComparer<IEnumerable<sbyte>>)(((IProperty)int8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte>)(source.GetCurrentValue<sbyte[]>(int8Array))))))), (((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))) == null ? null : ((sbyte[][][])(((ValueComparer<object>)(((IProperty)int8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<sbyte[][][]>(int8NestedCollection))))))), ((ValueComparer<int>)(((IProperty)intNumberToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToBytesConverterProperty)), ((ValueComparer<int>)(((IProperty)intNumberToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(intNumberToStringConverterProperty)), (source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer<int?>)(((IProperty)nullIntToNullStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullIntToNullStringConverterProperty))), (source.GetCurrentValue<bool?>(nullableBool) == null ? null : ((ValueComparer<bool?>)(((IProperty)nullableBool).GetValueComparer())).Snapshot(source.GetCurrentValue<bool?>(nullableBool))), (((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))) == null ? null : ((bool? [])(((ValueComparer<IEnumerable<bool?>>)(((IProperty)nullableBoolArray).GetValueComparer())).Snapshot(((IEnumerable<bool?>)(source.GetCurrentValue<bool? []>(nullableBoolArray))))))), (source.GetCurrentValue<byte[]>(nullableBytes) == null ? null : ((ValueComparer<byte[]>)(((IProperty)nullableBytes).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(nullableBytes))), (((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))) == null ? null : ((byte[][])(((ValueComparer<object>)(((IProperty)nullableBytesArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][]>(nullableBytesArray))))))), (((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))) == null ? null : ((byte[][][])(((ValueComparer<object>)(((IProperty)nullableBytesNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte[][][]>(nullableBytesNestedCollection))))))), (source.GetCurrentValue<char?>(nullableChar) == null ? null : ((ValueComparer<char?>)(((IProperty)nullableChar).GetValueComparer())).Snapshot(source.GetCurrentValue<char?>(nullableChar))), (((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray))) == null ? null : ((char? [])(((ValueComparer<IEnumerable<char?>>)(((IProperty)nullableCharArray).GetValueComparer())).Snapshot(((IEnumerable<char?>)(source.GetCurrentValue<char? []>(nullableCharArray)))))))))); + var entity3 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg3 = ((ISnapshot)(new Snapshot<DateOnly?, DateOnly? [], DateTime?, DateTime? [], decimal?, decimal? [], double?, double? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], CompiledModelTestBase.Enum16?, CompiledModelTestBase.Enum16? [], List<CompiledModelTestBase.Enum16?>, List<CompiledModelTestBase.Enum16?>, CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], CompiledModelTestBase.Enum32?, CompiledModelTestBase.Enum32? [], List<CompiledModelTestBase.Enum32?>, List<CompiledModelTestBase.Enum32?>, CompiledModelTestBase.Enum32? [][][], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], CompiledModelTestBase.Enum64?, CompiledModelTestBase.Enum64? [], List<CompiledModelTestBase.Enum64?>, List<CompiledModelTestBase.Enum64?>, CompiledModelTestBase.Enum8?, CompiledModelTestBase.Enum8? [], CompiledModelTestBase.Enum8?>((source.GetCurrentValue<DateOnly?>(nullableDateOnly) == null ? null : ((ValueComparer<DateOnly?>)(((IProperty)nullableDateOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<DateOnly?>(nullableDateOnly))), (((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))) == null ? null : ((DateOnly? [])(((ValueComparer<IEnumerable<DateOnly?>>)(((IProperty)nullableDateOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<DateOnly?>)(source.GetCurrentValue<DateOnly? []>(nullableDateOnlyArray))))))), (source.GetCurrentValue<DateTime?>(nullableDateTime) == null ? null : ((ValueComparer<DateTime?>)(((IProperty)nullableDateTime).GetValueComparer())).Snapshot(source.GetCurrentValue<DateTime?>(nullableDateTime))), (((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))) == null ? null : ((DateTime? [])(((ValueComparer<IEnumerable<DateTime?>>)(((IProperty)nullableDateTimeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime?>)(source.GetCurrentValue<DateTime? []>(nullableDateTimeArray))))))), (source.GetCurrentValue<decimal?>(nullableDecimal) == null ? null : ((ValueComparer<decimal?>)(((IProperty)nullableDecimal).GetValueComparer())).Snapshot(source.GetCurrentValue<decimal?>(nullableDecimal))), (((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))) == null ? null : ((decimal? [])(((ValueComparer<IEnumerable<decimal?>>)(((IProperty)nullableDecimalArray).GetValueComparer())).Snapshot(((IEnumerable<decimal?>)(source.GetCurrentValue<decimal? []>(nullableDecimalArray))))))), (source.GetCurrentValue<double?>(nullableDouble) == null ? null : ((ValueComparer<double?>)(((IProperty)nullableDouble).GetValueComparer())).Snapshot(source.GetCurrentValue<double?>(nullableDouble))), (((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))) == null ? null : ((double? [])(((ValueComparer<IEnumerable<double?>>)(((IProperty)nullableDoubleArray).GetValueComparer())).Snapshot(((IEnumerable<double?>)(source.GetCurrentValue<double? []>(nullableDoubleArray))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum16?>)(((IProperty)nullableEnum16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum16?>(nullableEnum16AsString))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<CompiledModelTestBase.Enum16? []>(nullableEnum16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))) == null ? null : ((List<CompiledModelTestBase.Enum16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum16?>>)(((IProperty)nullableEnum16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum16?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum16?>>(nullableEnum16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum32?>)(((IProperty)nullableEnum32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum32?>(nullableEnum32AsString))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<CompiledModelTestBase.Enum32? []>(nullableEnum32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))) == null ? null : ((List<CompiledModelTestBase.Enum32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum32?>>)(((IProperty)nullableEnum32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum32?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum32?>>(nullableEnum32Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum32? [][][])(((ValueComparer<object>)(((IProperty)nullableEnum32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum32? [][][]>(nullableEnum32NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum64?>)(((IProperty)nullableEnum64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum64?>(nullableEnum64AsString))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<CompiledModelTestBase.Enum64? []>(nullableEnum64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))) == null ? null : ((List<CompiledModelTestBase.Enum64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum64?>>)(((IProperty)nullableEnum64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum64?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum64?>>(nullableEnum64Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.Enum8?>)(((IProperty)nullableEnum8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.Enum8?>(nullableEnum8AsString)))))); + var entity4 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg4 = ((ISnapshot)(new Snapshot<CompiledModelTestBase.Enum8? [], List<CompiledModelTestBase.Enum8?>, List<CompiledModelTestBase.Enum8?>, CompiledModelTestBase.Enum8? [][], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], CompiledModelTestBase.EnumU16?, CompiledModelTestBase.EnumU16? [], List<CompiledModelTestBase.EnumU16?>, List<CompiledModelTestBase.EnumU16?>, CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], CompiledModelTestBase.EnumU32?, CompiledModelTestBase.EnumU32? [], List<CompiledModelTestBase.EnumU32?>, List<CompiledModelTestBase.EnumU32?>, CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], CompiledModelTestBase.EnumU64?, CompiledModelTestBase.EnumU64? [], List<CompiledModelTestBase.EnumU64?>, List<CompiledModelTestBase.EnumU64?>, CompiledModelTestBase.EnumU64? [][], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], CompiledModelTestBase.EnumU8?, CompiledModelTestBase.EnumU8? [], List<CompiledModelTestBase.EnumU8?>, List<CompiledModelTestBase.EnumU8?>, float?>((((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))) == null ? null : ((CompiledModelTestBase.Enum8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<CompiledModelTestBase.Enum8? []>(nullableEnum8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))) == null ? null : ((List<CompiledModelTestBase.Enum8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.Enum8?>>)(((IProperty)nullableEnum8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.Enum8?>)(source.GetCurrentValue<List<CompiledModelTestBase.Enum8?>>(nullableEnum8Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))) == null ? null : ((CompiledModelTestBase.Enum8? [][])(((ValueComparer<object>)(((IProperty)nullableEnum8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.Enum8? [][]>(nullableEnum8NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU16?>)(((IProperty)nullableEnumU16AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU16?>(nullableEnumU16AsString))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU16? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU16? []>(nullableEnumU16AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU16?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU16?>>)(((IProperty)nullableEnumU16Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU16?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU16?>>(nullableEnumU16Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU32?>)(((IProperty)nullableEnumU32AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU32?>(nullableEnumU32AsString))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU32? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU32? []>(nullableEnumU32AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU32?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU32?>>)(((IProperty)nullableEnumU32Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU32?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU32?>>(nullableEnumU32Collection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU64?>)(((IProperty)nullableEnumU64AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU64?>(nullableEnumU64AsString))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU64? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? []>(nullableEnumU64AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU64?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU64?>>)(((IProperty)nullableEnumU64Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU64?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU64?>>(nullableEnumU64Collection))))))), (((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))) == null ? null : ((CompiledModelTestBase.EnumU64? [][])(((ValueComparer<object>)(((IProperty)nullableEnumU64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<CompiledModelTestBase.EnumU64? [][]>(nullableEnumU64NestedCollection))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Array).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8Array))))))), (source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString) == null ? null : ((ValueComparer<CompiledModelTestBase.EnumU8?>)(((IProperty)nullableEnumU8AsString).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.EnumU8?>(nullableEnumU8AsString))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))) == null ? null : ((CompiledModelTestBase.EnumU8? [])(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringArray).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<CompiledModelTestBase.EnumU8? []>(nullableEnumU8AsStringArray))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8AsStringCollection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8AsStringCollection))))))), (((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))) == null ? null : ((List<CompiledModelTestBase.EnumU8?>)(((ValueComparer<IEnumerable<CompiledModelTestBase.EnumU8?>>)(((IProperty)nullableEnumU8Collection).GetValueComparer())).Snapshot(((IEnumerable<CompiledModelTestBase.EnumU8?>)(source.GetCurrentValue<List<CompiledModelTestBase.EnumU8?>>(nullableEnumU8Collection))))))), (source.GetCurrentValue<float?>(nullableFloat) == null ? null : ((ValueComparer<float?>)(((IProperty)nullableFloat).GetValueComparer())).Snapshot(source.GetCurrentValue<float?>(nullableFloat)))))); + var entity5 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg5 = ((ISnapshot)(new Snapshot<float? [], Guid?, Guid? [], Guid? [][], IPAddress, IPAddress[], short?, short? [], int?, int? [], int? [][], long?, long? [], List<long? [][]>, sbyte?, sbyte? [], PhysicalAddress, PhysicalAddress[], IEnumerable<PhysicalAddress[][]>, string, string[], string[][], TimeOnly?, TimeOnly? [], TimeSpan?, TimeSpan? [], ushort?, ushort? [], uint?, uint? []>((((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))) == null ? null : ((float? [])(((ValueComparer<IEnumerable<float?>>)(((IProperty)nullableFloatArray).GetValueComparer())).Snapshot(((IEnumerable<float?>)(source.GetCurrentValue<float? []>(nullableFloatArray))))))), (source.GetCurrentValue<Guid?>(nullableGuid) == null ? null : ((ValueComparer<Guid?>)(((IProperty)nullableGuid).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid?>(nullableGuid))), (((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))) == null ? null : ((Guid? [])(((ValueComparer<IEnumerable<Guid?>>)(((IProperty)nullableGuidArray).GetValueComparer())).Snapshot(((IEnumerable<Guid?>)(source.GetCurrentValue<Guid? []>(nullableGuidArray))))))), (((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))) == null ? null : ((Guid? [][])(((ValueComparer<object>)(((IProperty)nullableGuidNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Guid? [][]>(nullableGuidNestedCollection))))))), (source.GetCurrentValue<IPAddress>(nullableIPAddress) == null ? null : ((ValueComparer<IPAddress>)(((IProperty)nullableIPAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<IPAddress>(nullableIPAddress))), (((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)nullableIPAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(nullableIPAddressArray))))))), (source.GetCurrentValue<short?>(nullableInt16) == null ? null : ((ValueComparer<short?>)(((IProperty)nullableInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<short?>(nullableInt16))), (((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))) == null ? null : ((short? [])(((ValueComparer<IEnumerable<short?>>)(((IProperty)nullableInt16Array).GetValueComparer())).Snapshot(((IEnumerable<short?>)(source.GetCurrentValue<short? []>(nullableInt16Array))))))), (source.GetCurrentValue<int?>(nullableInt32) == null ? null : ((ValueComparer<int?>)(((IProperty)nullableInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<int?>(nullableInt32))), (((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))) == null ? null : ((int? [])(((ValueComparer<IEnumerable<int?>>)(((IProperty)nullableInt32Array).GetValueComparer())).Snapshot(((IEnumerable<int?>)(source.GetCurrentValue<int? []>(nullableInt32Array))))))), (((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))) == null ? null : ((int? [][])(((ValueComparer<object>)(((IProperty)nullableInt32NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<int? [][]>(nullableInt32NestedCollection))))))), (source.GetCurrentValue<long?>(nullableInt64) == null ? null : ((ValueComparer<long?>)(((IProperty)nullableInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(nullableInt64))), (((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))) == null ? null : ((long? [])(((ValueComparer<IEnumerable<long?>>)(((IProperty)nullableInt64Array).GetValueComparer())).Snapshot(((IEnumerable<long?>)(source.GetCurrentValue<long? []>(nullableInt64Array))))))), (((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))) == null ? null : ((List<long? [][]>)(((ValueComparer<object>)(((IProperty)nullableInt64NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<long? [][]>>(nullableInt64NestedCollection))))))), (source.GetCurrentValue<sbyte?>(nullableInt8) == null ? null : ((ValueComparer<sbyte?>)(((IProperty)nullableInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<sbyte?>(nullableInt8))), (((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))) == null ? null : ((sbyte? [])(((ValueComparer<IEnumerable<sbyte?>>)(((IProperty)nullableInt8Array).GetValueComparer())).Snapshot(((IEnumerable<sbyte?>)(source.GetCurrentValue<sbyte? []>(nullableInt8Array))))))), (source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)nullablePhysicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(nullablePhysicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(nullablePhysicalAddressArray))))))), (((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))) == null ? null : ((IEnumerable<PhysicalAddress[][]>)(((ValueComparer<object>)(((IProperty)nullablePhysicalAddressNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<PhysicalAddress[][]>>(nullablePhysicalAddressNestedCollection))))))), (source.GetCurrentValue<string>(nullableString) == null ? null : ((ValueComparer<string>)(((IProperty)nullableString).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(nullableString))), (((object)(source.GetCurrentValue<string[]>(nullableStringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)nullableStringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(nullableStringArray))))))), (((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)nullableStringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(nullableStringNestedCollection))))))), (source.GetCurrentValue<TimeOnly?>(nullableTimeOnly) == null ? null : ((ValueComparer<TimeOnly?>)(((IProperty)nullableTimeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly?>(nullableTimeOnly))), (((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))) == null ? null : ((TimeOnly? [])(((ValueComparer<IEnumerable<TimeOnly?>>)(((IProperty)nullableTimeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly?>)(source.GetCurrentValue<TimeOnly? []>(nullableTimeOnlyArray))))))), (source.GetCurrentValue<TimeSpan?>(nullableTimeSpan) == null ? null : ((ValueComparer<TimeSpan?>)(((IProperty)nullableTimeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan?>(nullableTimeSpan))), (((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))) == null ? null : ((TimeSpan? [])(((ValueComparer<IEnumerable<TimeSpan?>>)(((IProperty)nullableTimeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan?>)(source.GetCurrentValue<TimeSpan? []>(nullableTimeSpanArray))))))), (source.GetCurrentValue<ushort?>(nullableUInt16) == null ? null : ((ValueComparer<ushort?>)(((IProperty)nullableUInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort?>(nullableUInt16))), (((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))) == null ? null : ((ushort? [])(((ValueComparer<IEnumerable<ushort?>>)(((IProperty)nullableUInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort?>)(source.GetCurrentValue<ushort? []>(nullableUInt16Array))))))), (source.GetCurrentValue<uint?>(nullableUInt32) == null ? null : ((ValueComparer<uint?>)(((IProperty)nullableUInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint?>(nullableUInt32))), (((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array))) == null ? null : ((uint? [])(((ValueComparer<IEnumerable<uint?>>)(((IProperty)nullableUInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint?>)(source.GetCurrentValue<uint? []>(nullableUInt32Array)))))))))); + var entity6 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + var liftedArg6 = ((ISnapshot)(new Snapshot<ulong?, ulong? [], byte?, byte? [], byte? [][], 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<ulong?>(nullableUInt64) == null ? null : ((ValueComparer<ulong?>)(((IProperty)nullableUInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong?>(nullableUInt64))), (((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))) == null ? null : ((ulong? [])(((ValueComparer<IEnumerable<ulong?>>)(((IProperty)nullableUInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong?>)(source.GetCurrentValue<ulong? []>(nullableUInt64Array))))))), (source.GetCurrentValue<byte?>(nullableUInt8) == null ? null : ((ValueComparer<byte?>)(((IProperty)nullableUInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte?>(nullableUInt8))), (((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))) == null ? null : ((byte? [])(((ValueComparer<IEnumerable<byte?>>)(((IProperty)nullableUInt8Array).GetValueComparer())).Snapshot(((IEnumerable<byte?>)(source.GetCurrentValue<byte? []>(nullableUInt8Array))))))), (((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))) == null ? null : ((byte? [][])(((ValueComparer<object>)(((IProperty)nullableUInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<byte? [][]>(nullableUInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(nullableUri) == null ? null : ((ValueComparer<Uri>)(((IProperty)nullableUri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(nullableUri))), (((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)nullableUriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(nullableUriArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddress) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddress).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddress))), (((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))) == null ? null : ((PhysicalAddress[])(((ValueComparer<object>)(((IProperty)physicalAddressArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<PhysicalAddress[]>(physicalAddressArray))))))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToBytesConverterProperty))), (source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer<PhysicalAddress>)(((IProperty)physicalAddressToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<PhysicalAddress>(physicalAddressToStringConverterProperty))), (source.GetCurrentValue<string>(@string) == null ? null : ((ValueComparer<string>)(((IProperty)@string).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(@string))), (((object)(source.GetCurrentValue<string[]>(stringArray))) == null ? null : ((string[])(((ValueComparer<object>)(((IProperty)stringArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[]>(stringArray))))))), (((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))) == null ? null : ((string[][])(((ValueComparer<object>)(((IProperty)stringNestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<string[][]>(stringNestedCollection))))))), (source.GetCurrentValue<string>(stringToBoolConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBoolConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBoolConverterProperty))), (source.GetCurrentValue<string>(stringToBytesConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToBytesConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToBytesConverterProperty))), (source.GetCurrentValue<string>(stringToCharConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToCharConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToCharConverterProperty))), (source.GetCurrentValue<string>(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeConverterProperty))), (source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDateTimeOffsetConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDateTimeOffsetConverterProperty))), (source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDecimalNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDecimalNumberConverterProperty))), (source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToDoubleNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToDoubleNumberConverterProperty))), (source.GetCurrentValue<string>(stringToEnumConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToEnumConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToEnumConverterProperty))), (source.GetCurrentValue<string>(stringToGuidConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToGuidConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToGuidConverterProperty))), (source.GetCurrentValue<string>(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToIntNumberConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToIntNumberConverterProperty))), (source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeOnlyConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeOnlyConverterProperty))), (source.GetCurrentValue<string>(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToTimeSpanConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToTimeSpanConverterProperty))), (source.GetCurrentValue<string>(stringToUriConverterProperty) == null ? null : ((ValueComparer<string>)(((IProperty)stringToUriConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(stringToUriConverterProperty))), ((ValueComparer<TimeOnly>)(((IProperty)timeOnly).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnly)), (((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray))) == null ? null : ((TimeOnly[])(((ValueComparer<IEnumerable<TimeOnly>>)(((IProperty)timeOnlyArray).GetValueComparer())).Snapshot(((IEnumerable<TimeOnly>)(source.GetCurrentValue<TimeOnly[]>(timeOnlyArray)))))))))); + var entity7 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, ((ISnapshot)(new Snapshot<TimeOnly, TimeOnly, TimeSpan, TimeSpan[], TimeSpan, TimeSpan, ushort, ushort[], uint, uint[], ulong, ulong[], byte, byte[], List<byte[]>, Uri, Uri[], Uri>(((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToStringConverterProperty)), ((ValueComparer<TimeOnly>)(((IProperty)timeOnlyToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeOnly>(timeOnlyToTicksConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpan).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpan)), (((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))) == null ? null : ((TimeSpan[])(((ValueComparer<IEnumerable<TimeSpan>>)(((IProperty)timeSpanArray).GetValueComparer())).Snapshot(((IEnumerable<TimeSpan>)(source.GetCurrentValue<TimeSpan[]>(timeSpanArray))))))), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToStringConverterProperty)), ((ValueComparer<TimeSpan>)(((IProperty)timeSpanToTicksConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<TimeSpan>(timeSpanToTicksConverterProperty)), ((ValueComparer<ushort>)(((IProperty)uInt16).GetValueComparer())).Snapshot(source.GetCurrentValue<ushort>(uInt16)), (((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))) == null ? null : ((ushort[])(((ValueComparer<IEnumerable<ushort>>)(((IProperty)uInt16Array).GetValueComparer())).Snapshot(((IEnumerable<ushort>)(source.GetCurrentValue<ushort[]>(uInt16Array))))))), ((ValueComparer<uint>)(((IProperty)uInt32).GetValueComparer())).Snapshot(source.GetCurrentValue<uint>(uInt32)), (((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))) == null ? null : ((uint[])(((ValueComparer<IEnumerable<uint>>)(((IProperty)uInt32Array).GetValueComparer())).Snapshot(((IEnumerable<uint>)(source.GetCurrentValue<uint[]>(uInt32Array))))))), ((ValueComparer<ulong>)(((IProperty)uInt64).GetValueComparer())).Snapshot(source.GetCurrentValue<ulong>(uInt64)), (((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))) == null ? null : ((ulong[])(((ValueComparer<IEnumerable<ulong>>)(((IProperty)uInt64Array).GetValueComparer())).Snapshot(((IEnumerable<ulong>)(source.GetCurrentValue<ulong[]>(uInt64Array))))))), ((ValueComparer<byte>)(((IProperty)uInt8).GetValueComparer())).Snapshot(source.GetCurrentValue<byte>(uInt8)), (source.GetCurrentValue<byte[]>(uInt8Array) == null ? null : ((ValueComparer<byte[]>)(((IProperty)uInt8Array).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(uInt8Array))), (((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))) == null ? null : ((List<byte[]>)(((ValueComparer<object>)(((IProperty)uInt8NestedCollection).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<byte[]>>(uInt8NestedCollection))))))), (source.GetCurrentValue<Uri>(uri) == null ? null : ((ValueComparer<Uri>)(((IProperty)uri).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uri))), (((object)(source.GetCurrentValue<Uri[]>(uriArray))) == null ? null : ((Uri[])(((ValueComparer<object>)(((IProperty)uriArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<Uri[]>(uriArray))))))), (source.GetCurrentValue<Uri>(uriToStringConverterProperty) == null ? null : ((ValueComparer<Uri>)(((IProperty)uriToStringConverterProperty).GetValueComparer())).Snapshot(source.GetCurrentValue<Uri>(uriToStringConverterProperty)))))) }))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); + ISnapshot () => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetValueComparer())).Snapshot(default(CompiledModelTestBase.ManyTypesId)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(default(CompiledModelTestBase.ManyTypesId))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))); + var entity8 = ((CompiledModelTestBase.ManyTypes)(source.Entity)); + return ((ISnapshot)(new Snapshot<CompiledModelTestBase.ManyTypesId>(((ValueComparer<CompiledModelTestBase.ManyTypesId>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.ManyTypesId>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 258, @@ -15862,779 +15603,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref CompiledModelTestBase.ManyTypesId UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Id(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] - public static extern ref bool[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] - public static extern ref bool[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] - public static extern ref bool UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Bytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Char(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] - public static extern ref char[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] - public static extern ref char[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] - public static extern ref char UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] - public static extern ref DateOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] - public static extern ref DateOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] - public static extern ref DateTimeOffset UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] - public static extern ref DateTime UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Decimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] - public static extern ref decimal[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] - public static extern ref decimal UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Double(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] - public static extern ref double[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] - public static extern ref double UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32>[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8 UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_EnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] - public static extern ref float UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Float(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] - public static extern ref float[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_FloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Guid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] - public static extern ref Guid[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] - public static extern ref ICollection<Guid[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] - public static extern ref Guid UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] - public static extern ref short UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] - public static extern ref short[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] - public static extern ref int[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] - public static extern ref int[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] - public static extern ref long UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] - public static extern ref long[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] - public static extern ref IList<long[]>[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] - public static extern ref sbyte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] - public static extern ref sbyte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] - public static extern ref sbyte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] - public static extern ref bool? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBool(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] - public static extern ref bool?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBoolArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytes(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] - public static extern ref byte[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] - public static extern ref byte[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] - public static extern ref char? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableChar(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] - public static extern ref char?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableCharArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] - public static extern ref DateOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] - public static extern ref DateOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] - public static extern ref DateTime? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTime(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] - public static extern ref DateTime?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] - public static extern ref decimal? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimal(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] - public static extern ref decimal?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] - public static extern ref double? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDouble(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] - public static extern ref double?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum32?[][][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.Enum8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.Enum8?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU16?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU16?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU32?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU32?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU64?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU64?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] - public static extern ref CompiledModelTestBase.EnumU8?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] - public static extern ref List<CompiledModelTestBase.EnumU8?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] - public static extern ref float? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloat(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] - public static extern ref float?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableFloatArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] - public static extern ref Guid? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuid(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] - public static extern ref Guid?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] - public static extern ref Guid?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] - public static extern ref IPAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] - public static extern ref short? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] - public static extern ref short?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] - public static extern ref int? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] - public static extern ref int?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] - public static extern ref int?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] - public static extern ref long?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] - public static extern ref List<long?[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] - public static extern ref sbyte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] - public static extern ref sbyte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] - public static extern ref IEnumerable<PhysicalAddress[][]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableString(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] - public static extern ref TimeOnly? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] - public static extern ref TimeSpan? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] - public static extern ref TimeSpan?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] - public static extern ref ushort? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] - public static extern ref ushort?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] - public static extern ref uint? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] - public static extern ref uint?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] - public static extern ref ulong? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] - public static extern ref ulong?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] - public static extern ref byte? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] - public static extern ref byte?[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] - public static extern ref byte?[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_NullableUriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddress(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] - public static extern ref PhysicalAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] - public static extern ref PhysicalAddress UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_String(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] - public static extern ref string[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] - public static extern ref string[][] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringNestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnly(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] - public static extern ref TimeOnly[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] - public static extern ref TimeOnly UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpan(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] - public static extern ref TimeSpan[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] - public static extern ref TimeSpan UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] - public static extern ref ushort UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] - public static extern ref ushort[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt16Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] - public static extern ref uint UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] - public static extern ref uint[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt32Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] - public static extern ref ulong UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] - public static extern ref ulong[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt64Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] - public static extern ref byte UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8Array(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] - public static extern ref List<byte[]> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_Uri(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] - public static extern ref Uri[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriArray(CompiledModelTestBase.ManyTypes @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] - public static extern ref Uri UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_ManyTypes_UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs new file mode 100644 index 00000000000..a7f933eb3fd --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesUnsafeAccessors.cs @@ -0,0 +1,790 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class ManyTypesUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref CompiledModelTestBase.ManyTypesId Id(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bool>k__BackingField")] + public static extern ref bool Bool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolArray>k__BackingField")] + public static extern ref bool[] BoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolNestedCollection>k__BackingField")] + public static extern ref bool[][] BoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToStringConverterProperty>k__BackingField")] + public static extern ref bool BoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToTwoValuesConverterProperty>k__BackingField")] + public static extern ref bool BoolToTwoValuesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BoolToZeroOneConverterProperty>k__BackingField")] + public static extern ref bool BoolToZeroOneConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Bytes>k__BackingField")] + public static extern ref byte[] Bytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesArray>k__BackingField")] + public static extern ref byte[][] BytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] BytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<BytesToStringConverterProperty>k__BackingField")] + public static extern ref byte[] BytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CastingConverterProperty>k__BackingField")] + public static extern ref int CastingConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Char>k__BackingField")] + public static extern ref char Char(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharArray>k__BackingField")] + public static extern ref char[] CharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharNestedCollection>k__BackingField")] + public static extern ref char[][] CharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<CharToStringConverterProperty>k__BackingField")] + public static extern ref char CharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnly>k__BackingField")] + public static extern ref DateOnly DateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyArray>k__BackingField")] + public static extern ref DateOnly[] DateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateOnlyToStringConverterProperty>k__BackingField")] + public static extern ref DateOnly DateOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTime>k__BackingField")] + public static extern ref DateTime DateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeArray>k__BackingField")] + public static extern ref DateTime[] DateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToBytesConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeOffsetToStringConverterProperty>k__BackingField")] + public static extern ref DateTimeOffset DateTimeOffsetToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToBinaryConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToBinaryConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToStringConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DateTimeToTicksConverterProperty>k__BackingField")] + public static extern ref DateTime DateTimeToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Decimal>k__BackingField")] + public static extern ref decimal Decimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalArray>k__BackingField")] + public static extern ref decimal[] DecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToBytesConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DecimalNumberToStringConverterProperty>k__BackingField")] + public static extern ref decimal DecimalNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Double>k__BackingField")] + public static extern ref double Double(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleArray>k__BackingField")] + public static extern ref double[] DoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToBytesConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<DoubleNumberToStringConverterProperty>k__BackingField")] + public static extern ref double DoubleNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16 Enum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16[] Enum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16> Enum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 Enum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32[] Enum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32> Enum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum32NestedCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32>[][] Enum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64 Enum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64[] Enum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64> Enum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8 Enum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[] Enum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8> Enum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8[][] Enum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToNumberConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumToStringConverterProperty>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32 EnumToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16 EnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16[] EnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16> EnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32 EnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32[] EnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32> EnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64 EnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[] EnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64> EnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64[][] EnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8 EnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8[] EnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<EnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8> EnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Float>k__BackingField")] + public static extern ref float Float(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FloatArray>k__BackingField")] + public static extern ref float[] FloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Guid>k__BackingField")] + public static extern ref Guid Guid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidArray>k__BackingField")] + public static extern ref Guid[] GuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidNestedCollection>k__BackingField")] + public static extern ref ICollection<Guid[][]> GuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToBytesConverterProperty>k__BackingField")] + public static extern ref Guid GuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<GuidToStringConverterProperty>k__BackingField")] + public static extern ref Guid GuidToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddress>k__BackingField")] + public static extern ref IPAddress IPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressArray>k__BackingField")] + public static extern ref IPAddress[] IPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToBytesConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IPAddressToStringConverterProperty>k__BackingField")] + public static extern ref IPAddress IPAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16>k__BackingField")] + public static extern ref short Int16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int16Array>k__BackingField")] + public static extern ref short[] Int16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32>k__BackingField")] + public static extern ref int Int32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32Array>k__BackingField")] + public static extern ref int[] Int32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int32NestedCollection>k__BackingField")] + public static extern ref int[][] Int32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64>k__BackingField")] + public static extern ref long Int64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64Array>k__BackingField")] + public static extern ref long[] Int64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int64NestedCollection>k__BackingField")] + public static extern ref IList<long[]>[] Int64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8>k__BackingField")] + public static extern ref sbyte Int8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8Array>k__BackingField")] + public static extern ref sbyte[] Int8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Int8NestedCollection>k__BackingField")] + public static extern ref sbyte[][][] Int8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToBytesConverterProperty>k__BackingField")] + public static extern ref int IntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<IntNumberToStringConverterProperty>k__BackingField")] + public static extern ref int IntNumberToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullIntToNullStringConverterProperty>k__BackingField")] + public static extern ref int? NullIntToNullStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBool>k__BackingField")] + public static extern ref bool? NullableBool(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBoolArray>k__BackingField")] + public static extern ref bool?[] NullableBoolArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytes>k__BackingField")] + public static extern ref byte[] NullableBytes(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesArray>k__BackingField")] + public static extern ref byte[][] NullableBytesArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableBytesNestedCollection>k__BackingField")] + public static extern ref byte[][][] NullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableChar>k__BackingField")] + public static extern ref char? NullableChar(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableCharArray>k__BackingField")] + public static extern ref char?[] NullableCharArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnly>k__BackingField")] + public static extern ref DateOnly? NullableDateOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateOnlyArray>k__BackingField")] + public static extern ref DateOnly?[] NullableDateOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTime>k__BackingField")] + public static extern ref DateTime? NullableDateTime(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDateTimeArray>k__BackingField")] + public static extern ref DateTime?[] NullableDateTimeArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimal>k__BackingField")] + public static extern ref decimal? NullableDecimal(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDecimalArray>k__BackingField")] + public static extern ref decimal?[] NullableDecimalArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDouble>k__BackingField")] + public static extern ref double? NullableDouble(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableDoubleArray>k__BackingField")] + public static extern ref double?[] NullableDoubleArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16? NullableEnum16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum16?[] NullableEnum16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum16?> NullableEnum16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32? NullableEnum32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[] NullableEnum32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum32?> NullableEnum32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum32NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum32?[][][] NullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64? NullableEnum64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum64?[] NullableEnum64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum64?> NullableEnum64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8? NullableEnum8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[] NullableEnum8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.Enum8?> NullableEnum8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnum8NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.Enum8?[][] NullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16? NullableEnumU16AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU16?[] NullableEnumU16AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU16Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU16?> NullableEnumU16Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32? NullableEnumU32AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU32?[] NullableEnumU32AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU32Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU32?> NullableEnumU32Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64? NullableEnumU64AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[] NullableEnumU64AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU64?> NullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU64NestedCollection>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU64?[][] NullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Array>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsString>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8? NullableEnumU8AsString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringArray>k__BackingField")] + public static extern ref CompiledModelTestBase.EnumU8?[] NullableEnumU8AsStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8AsStringCollection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8AsStringCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableEnumU8Collection>k__BackingField")] + public static extern ref List<CompiledModelTestBase.EnumU8?> NullableEnumU8Collection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloat>k__BackingField")] + public static extern ref float? NullableFloat(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableFloatArray>k__BackingField")] + public static extern ref float?[] NullableFloatArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuid>k__BackingField")] + public static extern ref Guid? NullableGuid(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidArray>k__BackingField")] + public static extern ref Guid?[] NullableGuidArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableGuidNestedCollection>k__BackingField")] + public static extern ref Guid?[][] NullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddress>k__BackingField")] + public static extern ref IPAddress NullableIPAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableIPAddressArray>k__BackingField")] + public static extern ref IPAddress[] NullableIPAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16>k__BackingField")] + public static extern ref short? NullableInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt16Array>k__BackingField")] + public static extern ref short?[] NullableInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32>k__BackingField")] + public static extern ref int? NullableInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32Array>k__BackingField")] + public static extern ref int?[] NullableInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt32NestedCollection>k__BackingField")] + public static extern ref int?[][] NullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64>k__BackingField")] + public static extern ref long? NullableInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64Array>k__BackingField")] + public static extern ref long?[] NullableInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt64NestedCollection>k__BackingField")] + public static extern ref List<long?[][]> NullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8>k__BackingField")] + public static extern ref sbyte? NullableInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableInt8Array>k__BackingField")] + public static extern ref sbyte?[] NullableInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress NullablePhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] NullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullablePhysicalAddressNestedCollection>k__BackingField")] + public static extern ref IEnumerable<PhysicalAddress[][]> NullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableString>k__BackingField")] + public static extern ref string NullableString(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringArray>k__BackingField")] + public static extern ref string[] NullableStringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableStringNestedCollection>k__BackingField")] + public static extern ref string[][] NullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnly>k__BackingField")] + public static extern ref TimeOnly? NullableTimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly?[] NullableTimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpan>k__BackingField")] + public static extern ref TimeSpan? NullableTimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableTimeSpanArray>k__BackingField")] + public static extern ref TimeSpan?[] NullableTimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16>k__BackingField")] + public static extern ref ushort? NullableUInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt16Array>k__BackingField")] + public static extern ref ushort?[] NullableUInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32>k__BackingField")] + public static extern ref uint? NullableUInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt32Array>k__BackingField")] + public static extern ref uint?[] NullableUInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64>k__BackingField")] + public static extern ref ulong? NullableUInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt64Array>k__BackingField")] + public static extern ref ulong?[] NullableUInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8>k__BackingField")] + public static extern ref byte? NullableUInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8Array>k__BackingField")] + public static extern ref byte?[] NullableUInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUInt8NestedCollection>k__BackingField")] + public static extern ref byte?[][] NullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUri>k__BackingField")] + public static extern ref Uri NullableUri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NullableUriArray>k__BackingField")] + public static extern ref Uri[] NullableUriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddress>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddress(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressArray>k__BackingField")] + public static extern ref PhysicalAddress[] PhysicalAddressArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToBytesConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<PhysicalAddressToStringConverterProperty>k__BackingField")] + public static extern ref PhysicalAddress PhysicalAddressToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<String>k__BackingField")] + public static extern ref string String(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringArray>k__BackingField")] + public static extern ref string[] StringArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringNestedCollection>k__BackingField")] + public static extern ref string[][] StringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBoolConverterProperty>k__BackingField")] + public static extern ref string StringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToBytesConverterProperty>k__BackingField")] + public static extern ref string StringToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToCharConverterProperty>k__BackingField")] + public static extern ref string StringToCharConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToDateOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDateTimeOffsetConverterProperty>k__BackingField")] + public static extern ref string StringToDateTimeOffsetConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDecimalNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDecimalNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToDoubleNumberConverterProperty>k__BackingField")] + public static extern ref string StringToDoubleNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToEnumConverterProperty>k__BackingField")] + public static extern ref string StringToEnumConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToGuidConverterProperty>k__BackingField")] + public static extern ref string StringToGuidConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToIntNumberConverterProperty>k__BackingField")] + public static extern ref string StringToIntNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeOnlyConverterProperty>k__BackingField")] + public static extern ref string StringToTimeOnlyConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToTimeSpanConverterProperty>k__BackingField")] + public static extern ref string StringToTimeSpanConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<StringToUriConverterProperty>k__BackingField")] + public static extern ref string StringToUriConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnly>k__BackingField")] + public static extern ref TimeOnly TimeOnly(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyArray>k__BackingField")] + public static extern ref TimeOnly[] TimeOnlyArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToStringConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeOnlyToTicksConverterProperty>k__BackingField")] + public static extern ref TimeOnly TimeOnlyToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpan>k__BackingField")] + public static extern ref TimeSpan TimeSpan(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanArray>k__BackingField")] + public static extern ref TimeSpan[] TimeSpanArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToStringConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<TimeSpanToTicksConverterProperty>k__BackingField")] + public static extern ref TimeSpan TimeSpanToTicksConverterProperty(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16>k__BackingField")] + public static extern ref ushort UInt16(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt16Array>k__BackingField")] + public static extern ref ushort[] UInt16Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32>k__BackingField")] + public static extern ref uint UInt32(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt32Array>k__BackingField")] + public static extern ref uint[] UInt32Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64>k__BackingField")] + public static extern ref ulong UInt64(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt64Array>k__BackingField")] + public static extern ref ulong[] UInt64Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8>k__BackingField")] + public static extern ref byte UInt8(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8Array>k__BackingField")] + public static extern ref byte[] UInt8Array(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UInt8NestedCollection>k__BackingField")] + public static extern ref List<byte[]> UInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Uri>k__BackingField")] + public static extern ref Uri Uri(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriArray>k__BackingField")] + public static extern ref Uri[] UriArray(CompiledModelTestBase.ManyTypes @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<UriToStringConverterProperty>k__BackingField")] + public static extern ref Uri UriToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs index b843f97d869..12506ade5eb 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -43,11 +42,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalDerivedId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalDerivedId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalDerivedId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalDerivedId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -56,17 +55,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalDerivedId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalDerivedId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalDerivedId)); @@ -77,11 +76,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalDerivedAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalDerivedAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalDerivedAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalDerivedAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -98,11 +97,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(2) ? entry.ReadStoreGeneratedValue<int>(2) : (entry.FlaggedAsTemporary(2) && entry.ReadShadowValue<int>(2) == 0 ? entry.ReadTemporaryValue<int>(2) : entry.ReadShadowValue<int>(2))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(2), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 2), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); id.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -111,17 +110,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -133,20 +132,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_details", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[3]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 3), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[3]); details.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -154,7 +153,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); details.TypeMapping = SqliteStringTypeMapping.Default; - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -163,20 +161,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<Number>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[4]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 4), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[4]); number.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -185,20 +183,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -207,20 +204,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 5), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeArray.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -229,53 +226,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -284,20 +280,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 6), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeEnumerable.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -306,23 +302,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -331,20 +326,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeIList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 7), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeIList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -353,23 +348,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -378,20 +372,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_refTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[8]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 8), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeList.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -400,53 +394,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -455,20 +448,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeArray", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[9]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 9), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeArray.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -477,23 +470,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -502,20 +494,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeEnumerable", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 10), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeEnumerable.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -524,37 +516,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -563,20 +554,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 11), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeIList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -585,37 +576,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -624,20 +614,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.OwnedType).GetField("_valueTypeList", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[12]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 12), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeList.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -646,37 +636,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedType0EntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -713,19 +702,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); manyOwned.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(instance) == null); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) == null, + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(instance) == null); manyOwned.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = value); manyOwned.SetAccessors( - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), + ICollection<CompiledModelTestBase.OwnedType> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.OwnedType>>(manyOwned), null); manyOwned.SetPropertyIndexes( index: 3, @@ -734,11 +723,11 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt relationshipIndex: 5, storeGenerationIndex: -1); manyOwned.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity) = (ICollection<CompiledModelTestBase.OwnedType>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), - () => (ICollection<CompiledModelTestBase.OwnedType>)(ICollection<CompiledModelTestBase.OwnedType>)new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)); + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.OwnedType> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity) = ((ICollection<CompiledModelTestBase.OwnedType>)(collection)), + ICollection<CompiledModelTestBase.OwnedType> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.OwnedType>, CompiledModelTestBase.OwnedType>(entity, setter), + ICollection<CompiledModelTestBase.OwnedType> () => ((ICollection<CompiledModelTestBase.OwnedType>)(((ICollection<CompiledModelTestBase.OwnedType>)(new HashSet<CompiledModelTestBase.OwnedType>(ReferenceEqualityComparer.Instance)))))); return runtimeForeignKey; } @@ -761,24 +750,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid, int>(source.ContainsKey("PrincipalDerivedId") ? (long)source["PrincipalDerivedId"] : 0L, source.ContainsKey("PrincipalDerivedAlternateId") ? (Guid)source["PrincipalDerivedAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"), source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid, int>((source.ContainsKey("PrincipalDerivedId") ? ((long)(source["PrincipalDerivedId"])) : 0L), (source.ContainsKey("PrincipalDerivedAlternateId") ? ((Guid)(source["PrincipalDerivedAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")), (source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, int>(default(long), default(Guid), default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, int>(((ValueComparer<long>)((IProperty)principalDerivedId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)((IProperty)principalDerivedAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, int>(((ValueComparer<long>)(((IProperty)principalDerivedId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalDerivedId)), ((ValueComparer<Guid>)(((IProperty)principalDerivedAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalDerivedAlternateId)), ((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 13, @@ -800,35 +789,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs index 2becfb8e68a..e27b04029b2 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -45,11 +44,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0L); principalBaseId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<long>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<long>(0) == 0L ? entry.ReadTemporaryValue<long>(0) : entry.ReadShadowValue<long>(0))), + long (InternalEntityEntry entry) => entry.ReadShadowValue<long>(0), + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalBaseId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalBaseId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); principalBaseId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -58,17 +57,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); principalBaseId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalBaseId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalBaseId)); @@ -80,11 +79,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: new Guid("00000000-0000-0000-0000-000000000000")); principalBaseAlternateId.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(1) ? entry.ReadStoreGeneratedValue<Guid>(1) : (entry.FlaggedAsTemporary(1) && entry.ReadShadowValue<Guid>(1) == new Guid("00000000-0000-0000-0000-000000000000") ? entry.ReadTemporaryValue<Guid>(1) : entry.ReadShadowValue<Guid>(1))), + Guid (InternalEntityEntry entry) => entry.ReadShadowValue<Guid>(1), + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalBaseAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalBaseAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); principalBaseAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -102,20 +101,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); details.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(instance) == null); + string (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._details(entity) == null, + string (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._details(instance) == null); details.SetSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(entity) = value); + (CompiledModelTestBase.OwnedType entity, string value) => OwnedTypeUnsafeAccessors._details(entity) = value); details.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._details(((CompiledModelTestBase.OwnedType)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(details, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(details), + object (ValueBuffer valueBuffer) => valueBuffer[2]); details.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -123,7 +122,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); details.TypeMapping = SqliteStringTypeMapping.Default; - details.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details", "TestNamespace") }); var number = runtimeEntityType.AddProperty( "Number", @@ -133,20 +131,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, sentinel: 0); number.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) == 0, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(instance) == 0); + int (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.Number(entity) == 0, + int (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.Number(instance) == 0); number.SetSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(entity) = value); + (CompiledModelTestBase.OwnedType entity, int value) => OwnedTypeUnsafeAccessors.Number(entity) = value); number.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), - (ValueBuffer valueBuffer) => valueBuffer[3]); + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.Number(((CompiledModelTestBase.OwnedType)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(number, 3), + int (InternalEntityEntry entry) => entry.GetCurrentValue<int>(number), + object (ValueBuffer valueBuffer) => valueBuffer[3]); number.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -155,20 +153,19 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); number.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); - number.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number", "TestNamespace") }); var refTypeArray = runtimeEntityType.AddProperty( "RefTypeArray", @@ -178,20 +175,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, IPAddress[] value) => OwnedTypeUnsafeAccessors._refTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[4]); + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 4), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[4]); refTypeArray.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -200,53 +197,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -256,20 +252,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<string> value) => OwnedTypeUnsafeAccessors._refTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[5]); + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 5), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[5]); refTypeEnumerable.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -278,23 +274,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -304,20 +299,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<string> value) => OwnedTypeUnsafeAccessors._refTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[6]); + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 6), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[6]); refTypeIList.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -326,23 +321,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -352,20 +346,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._refTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._refTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<IPAddress> value) => OwnedTypeUnsafeAccessors._refTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[7]); + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._refTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 7), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[7]); refTypeList.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -374,53 +368,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -430,20 +423,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(entity) = value); + (CompiledModelTestBase.OwnedType entity, DateTime[] value) => OwnedTypeUnsafeAccessors._valueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeArray(((CompiledModelTestBase.OwnedType)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 8), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); valueTypeArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -452,23 +445,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -478,20 +470,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(entity) = value); + (CompiledModelTestBase.OwnedType entity, IEnumerable<byte> value) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeEnumerable(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 9), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); valueTypeEnumerable.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -500,37 +492,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -540,20 +531,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(entity) = value); + (CompiledModelTestBase.OwnedType entity, IList<byte> value) => OwnedTypeUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 10), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); valueTypeIList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -562,37 +553,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -602,20 +592,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyAccessMode: PropertyAccessMode.Field, nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity), - (CompiledModelTestBase.OwnedType entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) == null, - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance), - (CompiledModelTestBase.OwnedType instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(instance) == null); + List<short> (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity), + bool (CompiledModelTestBase.OwnedType entity) => OwnedTypeUnsafeAccessors._valueTypeList(entity) == null, + List<short> (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance), + bool (CompiledModelTestBase.OwnedType instance) => OwnedTypeUnsafeAccessors._valueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.OwnedType entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(entity) = value); + (CompiledModelTestBase.OwnedType entity, List<short> value) => OwnedTypeUnsafeAccessors._valueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList((CompiledModelTestBase.OwnedType)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => OwnedTypeUnsafeAccessors._valueTypeList(((CompiledModelTestBase.OwnedType)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 11), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); valueTypeList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -624,37 +614,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("OwnedTypeEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList", "TestNamespace") }); var context = runtimeEntityType.AddServiceProperty( "Context", @@ -695,19 +684,19 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt eagerLoaded: true); owned.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity), - (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance), - (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(instance) == null); + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors._ownedField(entity) == null, + CompiledModelTestBase.OwnedType (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors._ownedField(instance) == null); owned.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.OwnedType value) => PrincipalBaseUnsafeAccessors._ownedField(entity) = value); owned.SetAccessors( - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField((CompiledModelTestBase.PrincipalBase)entry.Entity), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors._ownedField(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), + CompiledModelTestBase.OwnedType (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.OwnedType>(owned), null); owned.SetPropertyIndexes( index: 0, @@ -715,7 +704,6 @@ public static RuntimeForeignKey CreateForeignKey1(RuntimeEntityType declaringEnt shadowIndex: -1, relationshipIndex: 2, storeGenerationIndex: -1); - owned.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField", "TestNamespace") }); return runtimeForeignKey; } @@ -737,24 +725,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)((IProperty)details).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(details)), ((ValueComparer<int>)((IProperty)number).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(number)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, string, int, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId)), (source.GetCurrentValue<string>(details) == null ? null : ((ValueComparer<string>)(((IProperty)details).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(details))), ((ValueComparer<int>)(((IProperty)number).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(number)), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetValueComparer()).Snapshot(default(Guid)))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetValueComparer())).Snapshot(default(Guid)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<long, Guid>(source.ContainsKey("PrincipalBaseId") ? (long)source["PrincipalBaseId"] : 0L, source.ContainsKey("PrincipalBaseAlternateId") ? (Guid)source["PrincipalBaseAlternateId"] : new Guid("00000000-0000-0000-0000-000000000000"))); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<long, Guid>((source.ContainsKey("PrincipalBaseId") ? ((long)(source["PrincipalBaseId"])) : 0L), (source.ContainsKey("PrincipalBaseAlternateId") ? ((Guid)(source["PrincipalBaseAlternateId"])) : new Guid("00000000-0000-0000-0000-000000000000")))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid>(default(long), default(Guid))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid>(default(long), default(Guid))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot<long, Guid>(((ValueComparer<long>)((IProperty)principalBaseId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)((IProperty)principalBaseAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))); + var entity8 = ((CompiledModelTestBase.OwnedType)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid>(((ValueComparer<long>)(((IProperty)principalBaseId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalBaseId)), ((ValueComparer<Guid>)(((IProperty)principalBaseAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalBaseAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 12, @@ -776,35 +764,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__details(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_Number(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__refTypeList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeArray(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType_ValueTypeIList(CompiledModelTestBase.OwnedType @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_OwnedType__valueTypeList(CompiledModelTestBase.OwnedType @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs new file mode 100644 index 00000000000..ed8d21e397c --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeUnsafeAccessors.cs @@ -0,0 +1,45 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class OwnedTypeUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_details")] + public static extern ref string _details(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Number>k__BackingField")] + public static extern ref int Number(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeArray")] + public static extern ref IPAddress[] _refTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeEnumerable")] + public static extern ref IEnumerable<string> _refTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeIList")] + public static extern ref IList<string> _refTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_refTypeList")] + public static extern ref List<IPAddress> _refTypeList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeArray")] + public static extern ref DateTime[] _valueTypeArray(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeEnumerable")] + public static extern ref IEnumerable<byte> _valueTypeEnumerable(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.OwnedType @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_valueTypeList")] + public static extern ref List<short> _valueTypeList(CompiledModelTestBase.OwnedType @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs index 710532ba678..aed8cdbc797 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; @@ -49,20 +48,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Id>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), afterSaveBehavior: PropertySaveBehavior.Throw); id.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(instance).HasValue); + long? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Id(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Id(entity).HasValue), + long? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Id(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Id(instance).HasValue)); id.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<long> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, long? value) => PrincipalBaseUnsafeAccessors.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<long>>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Nullable<long>>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Id(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + long? (InternalEntityEntry entry) => entry.ReadOriginalValue<long?>(id, 0), + long? (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long?>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -71,23 +70,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetValueComparer(new NullableValueComparer<long>(id.TypeMapping.Comparer)); id.SetKeyValueComparer(new NullableValueComparer<long>(id.TypeMapping.KeyComparer)); id.SetCurrentValueComparer(new EntryCurrentValueComparer<long?>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id", "TestNamespace") }); var alternateId = runtimeEntityType.AddProperty( "AlternateId", @@ -98,20 +96,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas sentinel: new Guid("00000000-0000-0000-0000-000000000000"), jsonValueReaderWriter: new CompiledModelTestBase.MyJsonGuidReaderWriter()); alternateId.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, - (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, - (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); + Guid (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId, + bool (CompiledModelTestBase.PrincipalBase entity) => entity.AlternateId == new Guid("00000000-0000-0000-0000-000000000000"), + Guid (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId, + bool (CompiledModelTestBase.PrincipalBase instance) => instance.AlternateId == new Guid("00000000-0000-0000-0000-000000000000")); alternateId.SetSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetMaterializationSetter( (CompiledModelTestBase.PrincipalBase entity, Guid value) => entity.AlternateId = value); alternateId.SetAccessors( - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)entry.Entity).AlternateId, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => ((CompiledModelTestBase.PrincipalBase)(entry.Entity)).AlternateId, + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(alternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(alternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); alternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -128,11 +126,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas maxLength: 55, valueGeneratorFactory: new DiscriminatorValueGeneratorFactory().Create); discriminator.SetAccessors( - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 2), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), - (ValueBuffer valueBuffer) => valueBuffer[2]); + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadShadowValue<string>(0), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(discriminator, 2), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(discriminator), + object (ValueBuffer valueBuffer) => valueBuffer[2]); discriminator.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -147,20 +145,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("Enum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); enum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity), (object)(CompiledModelTestBase.AnEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(instance), (object)(CompiledModelTestBase.AnEnum)0L)); + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(entity))), ((object)((CompiledModelTestBase.AnEnum)0L))), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Enum1(instance))), ((object)((CompiledModelTestBase.AnEnum)0L)))); enum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum value) => PrincipalBaseUnsafeAccessors.Enum1(entity) = value); enum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 3), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), - (ValueBuffer valueBuffer) => valueBuffer[3]); + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum>(enum1, 3), + CompiledModelTestBase.AnEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1), + object (ValueBuffer valueBuffer) => valueBuffer[3]); enum1.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -169,29 +167,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum1.SetSentinelFromProviderValue(0); - enum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1", "TestNamespace") }); var enum2 = runtimeEntityType.AddProperty( "Enum2", @@ -200,20 +197,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<Enum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); enum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity).HasValue, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => !UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(instance).HasValue); + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Enum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => !(PrincipalBaseUnsafeAccessors.Enum2(entity).HasValue), + CompiledModelTestBase.AnEnum? (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Enum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => !(PrincipalBaseUnsafeAccessors.Enum2(instance).HasValue)); enum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, Nullable<CompiledModelTestBase.AnEnum> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(entity) = value == null ? value : (Nullable<CompiledModelTestBase.AnEnum>)(CompiledModelTestBase.AnEnum)value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AnEnum? value) => PrincipalBaseUnsafeAccessors.Enum2(entity) = (value == null ? value : ((CompiledModelTestBase.AnEnum? )(((CompiledModelTestBase.AnEnum)(value)))))); enum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2), - (ValueBuffer valueBuffer) => valueBuffer[4]); + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Enum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AnEnum?>(enum2, 4), + CompiledModelTestBase.AnEnum? (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2), + object (ValueBuffer valueBuffer) => valueBuffer[4]); enum2.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -222,30 +219,29 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); enum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AnEnum>( - (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AnEnum v) => v), + bool (CompiledModelTestBase.AnEnum v1, CompiledModelTestBase.AnEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AnEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AnEnum (CompiledModelTestBase.AnEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value), + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AnEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AnEnum, int>( - (CompiledModelTestBase.AnEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AnEnum)value))); + int (CompiledModelTestBase.AnEnum value) => ((int)(value)), + CompiledModelTestBase.AnEnum (int value) => ((CompiledModelTestBase.AnEnum)(value))))); enum2.SetValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.Comparer)); enum2.SetKeyValueComparer(new NullableValueComparer<CompiledModelTestBase.AnEnum>(enum2.TypeMapping.KeyComparer)); - enum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2", "TestNamespace") }); var flagsEnum1 = runtimeEntityType.AddProperty( "FlagsEnum1", @@ -253,20 +249,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: typeof(CompiledModelTestBase.PrincipalBase).GetProperty("FlagsEnum1", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum1>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); flagsEnum1.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity), (object)(CompiledModelTestBase.AFlagsEnum)0L), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(instance), (object)(CompiledModelTestBase.AFlagsEnum)0L)); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(entity))), ((object)((CompiledModelTestBase.AFlagsEnum)0L))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.FlagsEnum1(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.FlagsEnum1(instance))), ((object)((CompiledModelTestBase.AFlagsEnum)0L)))); flagsEnum1.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.FlagsEnum1(entity) = value); flagsEnum1.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 5), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), - (ValueBuffer valueBuffer) => valueBuffer[5]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.FlagsEnum1(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1, 5), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1), + object (ValueBuffer valueBuffer) => valueBuffer[5]); flagsEnum1.SetPropertyIndexes( index: 5, originalValueIndex: 5, @@ -275,29 +271,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum1.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum1.SetSentinelFromProviderValue(0); - flagsEnum1.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1", "TestNamespace") }); var flagsEnum2 = runtimeEntityType.AddProperty( "FlagsEnum2", @@ -306,20 +301,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<FlagsEnum2>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), propertyAccessMode: PropertyAccessMode.Property); flagsEnum2.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), - (CompiledModelTestBase.PrincipalBase entity) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(entity), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), - (CompiledModelTestBase.PrincipalBase instance) => object.Equals((object)UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(instance), (object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))); + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(entity))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C))), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => object.Equals(((object)(PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(instance))), ((object)(CompiledModelTestBase.AFlagsEnum.B | CompiledModelTestBase.AFlagsEnum.C)))); flagsEnum2.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(entity, value)); + (CompiledModelTestBase.PrincipalBase entity, CompiledModelTestBase.AFlagsEnum value) => PrincipalBaseUnsafeAccessors.Set_FlagsEnum2(entity, value)); flagsEnum2.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 6), - (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), - (ValueBuffer valueBuffer) => valueBuffer[6]); + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Get_FlagsEnum2(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.ReadOriginalValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2, 6), + CompiledModelTestBase.AFlagsEnum (InternalEntityEntry entry) => entry.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2), + object (ValueBuffer valueBuffer) => valueBuffer[6]); flagsEnum2.SetPropertyIndexes( index: 6, originalValueIndex: 6, @@ -328,29 +323,28 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); flagsEnum2.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), keyComparer: new ValueComparer<CompiledModelTestBase.AFlagsEnum>( - (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals((object)v1, (object)v2), - (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), - (CompiledModelTestBase.AFlagsEnum v) => v), + bool (CompiledModelTestBase.AFlagsEnum v1, CompiledModelTestBase.AFlagsEnum v2) => object.Equals(((object)(v1)), ((object)(v2))), + int (CompiledModelTestBase.AFlagsEnum v) => ((object)v).GetHashCode(), + CompiledModelTestBase.AFlagsEnum (CompiledModelTestBase.AFlagsEnum v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"), converter: new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value), + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<CompiledModelTestBase.AFlagsEnum, int>( JsonInt32ReaderWriter.Instance, new ValueConverter<CompiledModelTestBase.AFlagsEnum, int>( - (CompiledModelTestBase.AFlagsEnum value) => (int)value, - (int value) => (CompiledModelTestBase.AFlagsEnum)value))); + int (CompiledModelTestBase.AFlagsEnum value) => ((int)(value)), + CompiledModelTestBase.AFlagsEnum (int value) => ((CompiledModelTestBase.AFlagsEnum)(value))))); flagsEnum2.SetSentinelFromProviderValue(6); - flagsEnum2.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2", "TestNamespace"), ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2", "TestNamespace") }); var point = runtimeEntityType.AddProperty( "Point", @@ -361,11 +355,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas valueComparer: new CompiledModelTestBase.CustomValueComparer<Point>(), providerValueComparer: new CompiledModelTestBase.CustomValueComparer<Point>()); point.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(7) ? entry.ReadStoreGeneratedValue<Point>(0) : entry.FlaggedAsTemporary(7) && entry.ReadShadowValue<Point>(1) == null ? entry.ReadTemporaryValue<Point>(0) : entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), - (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 7), - (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), - (ValueBuffer valueBuffer) => valueBuffer[7]); + Point (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(7) ? entry.ReadStoreGeneratedValue<Point>(0) : (entry.FlaggedAsTemporary(7) && entry.ReadShadowValue<Point>(1) == null ? entry.ReadTemporaryValue<Point>(0) : entry.ReadShadowValue<Point>(1))), + Point (InternalEntityEntry entry) => entry.ReadShadowValue<Point>(1), + Point (InternalEntityEntry entry) => entry.ReadOriginalValue<Point>(point, 7), + Point (InternalEntityEntry entry) => entry.GetCurrentValue<Point>(point), + object (ValueBuffer valueBuffer) => valueBuffer[7]); point.SetPropertyIndexes( index: 7, originalValueIndex: 7, @@ -383,20 +377,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(instance) == null); + IPAddress[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) == null, + IPAddress[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeArray(instance) == null); refTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IPAddress[] value) => PrincipalBaseUnsafeAccessors.RefTypeArray(entity) = value); refTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 8), - (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[8]); + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IPAddress[] (InternalEntityEntry entry) => entry.ReadOriginalValue<IPAddress[]>(refTypeArray, 8), + IPAddress[] (InternalEntityEntry entry) => entry.GetCurrentValue<IPAddress[]>(refTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[8]); refTypeArray.SetPropertyIndexes( index: 8, originalValueIndex: 8, @@ -405,53 +399,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<IPAddress[], IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<IPAddress[], IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var refTypeEnumerable = runtimeEntityType.AddProperty( "RefTypeEnumerable", @@ -460,20 +453,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(instance) == null); + IEnumerable<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) == null, + IEnumerable<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(instance) == null); refTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<string> value) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(entity) = value); refTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 9), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[9]); + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<string>>(refTypeEnumerable, 9), + IEnumerable<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[9]); refTypeEnumerable.SetPropertyIndexes( index: 9, originalValueIndex: 9, @@ -482,23 +475,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable", "TestNamespace") }); var refTypeIList = runtimeEntityType.AddProperty( "RefTypeIList", @@ -507,20 +499,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(instance) == null); + IList<string> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) == null, + IList<string> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeIList(instance) == null); refTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<string> value) => PrincipalBaseUnsafeAccessors.RefTypeIList(entity) = value); refTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 10), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[10]); + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<string> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<string>>(refTypeIList, 10), + IList<string> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<string>>(refTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[10]); refTypeIList.SetPropertyIndexes( index: 10, originalValueIndex: 10, @@ -529,23 +521,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<string>, string>(new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v)), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<string>(new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<string>, string>( JsonStringReaderWriter.Instance), elementMapping: SqliteStringTypeMapping.Default); - refTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList", "TestNamespace") }); var refTypeList = runtimeEntityType.AddProperty( "RefTypeList", @@ -554,20 +545,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<RefTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); refTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(instance) == null); + List<IPAddress> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) == null, + List<IPAddress> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.RefTypeList(instance) == null); refTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<IPAddress> value) => PrincipalBaseUnsafeAccessors.RefTypeList(entity) = value); refTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 11), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), - (ValueBuffer valueBuffer) => valueBuffer[11]); + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.RefTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<IPAddress> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<IPAddress>>(refTypeList, 11), + List<IPAddress> (InternalEntityEntry entry) => entry.GetCurrentValue<List<IPAddress>>(refTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[11]); refTypeList.SetPropertyIndexes( index: 11, originalValueIndex: 11, @@ -576,53 +567,52 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); refTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), keyComparer: new ListOfReferenceTypesComparer<List<IPAddress>, IPAddress>(new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v)), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<IPAddress>(new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))), jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter<List<IPAddress>, IPAddress>( new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)))), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)))), elementMapping: SqliteStringTypeMapping.Default.Clone( comparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), keyComparer: new ValueComparer<IPAddress>( - (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), - (IPAddress v) => ((object)v).GetHashCode(), - (IPAddress v) => v), + bool (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), + int (IPAddress v) => ((object)v).GetHashCode(), + IPAddress (IPAddress v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( size: 45), converter: new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v)), + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v)), jsonValueReaderWriter: new JsonConvertedValueReaderWriter<IPAddress, string>( JsonStringReaderWriter.Instance, new ValueConverter<IPAddress, string>( - (IPAddress v) => ((object)v).ToString(), - (string v) => IPAddress.Parse(v))))); - refTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList", "TestNamespace") }); + string (IPAddress v) => ((object)v).ToString(), + IPAddress (string v) => IPAddress.Parse(v))))); var valueTypeArray = runtimeEntityType.AddProperty( "ValueTypeArray", @@ -631,20 +621,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeArray>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeArray.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(instance) == null); + DateTime[] (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) == null, + DateTime[] (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeArray(instance) == null); valueTypeArray.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, DateTime[] value) => PrincipalBaseUnsafeAccessors.ValueTypeArray(entity) = value); valueTypeArray.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 12), - (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), - (ValueBuffer valueBuffer) => valueBuffer[12]); + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeArray(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + DateTime[] (InternalEntityEntry entry) => entry.ReadOriginalValue<DateTime[]>(valueTypeArray, 12), + DateTime[] (InternalEntityEntry entry) => entry.GetCurrentValue<DateTime[]>(valueTypeArray), + object (ValueBuffer valueBuffer) => valueBuffer[12]); valueTypeArray.SetPropertyIndexes( index: 12, originalValueIndex: 12, @@ -653,23 +643,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), keyComparer: new ListOfValueTypesComparer<DateTime[], DateTime>(new ValueComparer<DateTime>( - (DateTime v1, DateTime v2) => v1.Equals(v2), - (DateTime v) => ((object)v).GetHashCode(), - (DateTime v) => v)), + bool (DateTime v1, DateTime v2) => v1.Equals(v2), + int (DateTime v) => ((object)v).GetHashCode(), + DateTime (DateTime v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<DateTime>(new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<DateTime[], DateTime>( SqliteJsonDateTimeReaderWriter.Instance), elementMapping: SqliteDateTimeTypeMapping.Default); - valueTypeArray.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray", "TestNamespace") }); var valueTypeEnumerable = runtimeEntityType.AddProperty( "ValueTypeEnumerable", @@ -678,20 +667,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeEnumerable>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeEnumerable.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(instance) == null); + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) == null, + IEnumerable<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(instance) == null); valueTypeEnumerable.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IEnumerable<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(entity) = value); valueTypeEnumerable.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 13), - (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), - (ValueBuffer valueBuffer) => valueBuffer[13]); + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeEnumerable(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IEnumerable<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IEnumerable<byte>>(valueTypeEnumerable, 13), + IEnumerable<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable), + object (ValueBuffer valueBuffer) => valueBuffer[13]); valueTypeEnumerable.SetPropertyIndexes( index: 13, originalValueIndex: 13, @@ -700,37 +689,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeEnumerable.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable", "TestNamespace") }); var valueTypeIList = runtimeEntityType.AddProperty( "ValueTypeIList", @@ -739,20 +727,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeIList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeIList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(instance) == null); + IList<byte> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) == null, + IList<byte> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeIList(instance) == null); valueTypeIList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, IList<byte> value) => PrincipalBaseUnsafeAccessors.ValueTypeIList(entity) = value); valueTypeIList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 14), - (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), - (ValueBuffer valueBuffer) => valueBuffer[14]); + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeIList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + IList<byte> (InternalEntityEntry entry) => entry.ReadOriginalValue<IList<byte>>(valueTypeIList, 14), + IList<byte> (InternalEntityEntry entry) => entry.GetCurrentValue<IList<byte>>(valueTypeIList), + object (ValueBuffer valueBuffer) => valueBuffer[14]); valueTypeIList.SetPropertyIndexes( index: 14, originalValueIndex: 14, @@ -761,37 +749,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), keyComparer: new ListOfValueTypesComparer<List<byte>, byte>(new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v)), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<byte>(new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<byte>, byte>( JsonByteReaderWriter.Instance), elementMapping: ByteTypeMapping.Default.Clone( comparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), keyComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), providerValueComparer: new ValueComparer<byte>( - (byte v1, byte v2) => v1 == v2, - (byte v) => (int)v, - (byte v) => v), + bool (byte v1, byte v2) => v1 == v2, + int (byte v) => ((int)(v)), + byte (byte v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeIList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList", "TestNamespace") }); var valueTypeList = runtimeEntityType.AddProperty( "ValueTypeList", @@ -800,20 +787,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.PrincipalBase).GetField("<ValueTypeList>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); valueTypeList.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(instance) == null); + List<short> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) == null, + List<short> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.ValueTypeList(instance) == null); valueTypeList.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, List<short> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, List<short> value) => PrincipalBaseUnsafeAccessors.ValueTypeList(entity) = value); valueTypeList.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 15), - (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), - (ValueBuffer valueBuffer) => valueBuffer[15]); + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.ValueTypeList(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + List<short> (InternalEntityEntry entry) => entry.ReadOriginalValue<List<short>>(valueTypeList, 15), + List<short> (InternalEntityEntry entry) => entry.GetCurrentValue<List<short>>(valueTypeList), + object (ValueBuffer valueBuffer) => valueBuffer[15]); valueTypeList.SetPropertyIndexes( index: 15, originalValueIndex: 15, @@ -822,37 +809,36 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); valueTypeList.TypeMapping = SqliteStringTypeMapping.Default.Clone( comparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), keyComparer: new ListOfValueTypesComparer<List<short>, short>(new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v)), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v)), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), converter: new CollectionToJsonStringConverter<short>(new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance)), jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter<List<short>, short>( JsonInt16ReaderWriter.Instance), elementMapping: ShortTypeMapping.Default.Clone( comparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), keyComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), providerValueComparer: new ValueComparer<short>( - (short v1, short v2) => v1 == v2, - (short v) => (int)v, - (short v) => v), + bool (short v1, short v2) => v1 == v2, + int (short v) => ((int)(v)), + short (short v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER"))); - valueTypeList.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -891,19 +877,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) == null, - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance), - (CompiledModelTestBase.PrincipalBase instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + bool (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance), + bool (CompiledModelTestBase.PrincipalBase instance) => PrincipalBaseUnsafeAccessors.Deriveds(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = value); + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds((CompiledModelTestBase.PrincipalBase)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalBaseUnsafeAccessors.Deriveds(((CompiledModelTestBase.PrincipalBase)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 1, @@ -912,12 +898,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 3, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalBase entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity), - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity) => PrincipalBaseUnsafeAccessors.Deriveds(entity), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalBase entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalBaseUnsafeAccessors.Deriveds(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalBase entity, Action<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalBase, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -947,24 +932,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key0.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key0)); var owned = runtimeEntityType.FindNavigation("Owned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Point>(default(Point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(default(Point)))); + ISnapshot () => ((ISnapshot)(new Snapshot<Point>((default(Point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(default(Point))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Point>(default(Point))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<Point>(default(Point))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, Point>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, Point>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, Point>(default(string), default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, Point>(default(string), default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null); + var entity8 = ((CompiledModelTestBase.PrincipalBase)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 16, @@ -986,53 +971,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref long? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Id(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] - public static extern ref CompiledModelTestBase.AnEnum? UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Enum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] - public static extern ref CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] - public static extern CompiledModelTestBase.AFlagsEnum UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] - public static extern void UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] - public static extern ref IPAddress[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] - public static extern ref IList<string> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] - public static extern ref List<IPAddress> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_RefTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] - public static extern ref DateTime[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] - public static extern ref IEnumerable<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] - public static extern ref IList<byte> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] - public static extern ref List<short> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_ValueTypeList(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] - public static extern ref CompiledModelTestBase.OwnedType UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(CompiledModelTestBase.PrincipalBase @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase_Deriveds(CompiledModelTestBase.PrincipalBase @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs index c04d9f0141a..1a587c051d0 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBasePrincipalDerivedDependentBasebyteEntityType.cs @@ -41,16 +41,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsId") ? entity["DerivedsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsId") ? instance["DerivedsId"] : null) == null); derivedsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["DerivedsId"] = ((object)(value))); derivedsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(0)) { @@ -59,26 +59,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null) == null) + if (entry.FlaggedAsTemporary(0) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null) == null) { return entry.ReadTemporaryValue<long>(0); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(derivedsId, 0), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(derivedsId, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); derivedsId.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -87,17 +87,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); derivedsId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); derivedsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(derivedsId)); @@ -108,16 +108,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); derivedsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("DerivedsAlternateId") ? entity["DerivedsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("DerivedsAlternateId") ? instance["DerivedsAlternateId"] : null) == null); derivedsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["DerivedsAlternateId"] = ((object)(value))); derivedsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(1)) { @@ -126,26 +126,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(1) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(1); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["DerivedsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("DerivedsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["DerivedsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), - (ValueBuffer valueBuffer) => valueBuffer[1]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(derivedsAlternateId, 1), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(derivedsAlternateId, 1), + object (ValueBuffer valueBuffer) => valueBuffer[1]); derivedsAlternateId.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -161,16 +161,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : (long)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); + long (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsId") ? entity["PrincipalsId"] : null) == null, + long (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null ? 0L : ((long)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsId") ? instance["PrincipalsId"] : null) == null); principalsId.SetSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetMaterializationSetter( - (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = (object)value); + (Dictionary<string, object> entity, long value) => entity["PrincipalsId"] = ((object)(value))); principalsId.SetAccessors( - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(2)) { @@ -179,26 +179,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null) == null) + if (entry.FlaggedAsTemporary(2) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null) == null) { return entry.ReadTemporaryValue<long>(2); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + long (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsId"] : null; - return nullableValue == null ? default(long) : (long)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsId"] : null); + return (nullableValue == null ? default(long) : ((long)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), - (ValueBuffer valueBuffer) => valueBuffer[2]); + long (InternalEntityEntry entry) => entry.ReadOriginalValue<long>(principalsId, 2), + long (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<long>(principalsId, 2), + object (ValueBuffer valueBuffer) => valueBuffer[2]); principalsId.SetPropertyIndexes( index: 2, originalValueIndex: 2, @@ -207,17 +207,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 2); principalsId.TypeMapping = LongTypeMapping.Default.Clone( comparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), keyComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), providerValueComparer: new ValueComparer<long>( - (long v1, long v2) => v1 == v2, - (long v) => ((object)v).GetHashCode(), - (long v) => v), + bool (long v1, long v2) => v1 == v2, + int (long v) => ((object)v).GetHashCode(), + long (long v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); principalsId.SetCurrentValueComparer(new EntryCurrentValueComparer<long>(principalsId)); @@ -228,16 +228,16 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas propertyInfo: runtimeEntityType.FindIndexerPropertyInfo(), afterSaveBehavior: PropertySaveBehavior.Throw); principalsAlternateId.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : (Guid)(((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); + Guid (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("PrincipalsAlternateId") ? entity["PrincipalsAlternateId"] : null) == null, + Guid (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null ? new Guid("00000000-0000-0000-0000-000000000000") : ((Guid)((((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("PrincipalsAlternateId") ? instance["PrincipalsAlternateId"] : null) == null); principalsAlternateId.SetSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetMaterializationSetter( - (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = (object)value); + (Dictionary<string, object> entity, Guid value) => entity["PrincipalsAlternateId"] = ((object)(value))); principalsAlternateId.SetAccessors( - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { if (entry.FlaggedAsStoreGenerated(3)) { @@ -246,26 +246,26 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas else { { - if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null) == null) + if (entry.FlaggedAsTemporary(3) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null) == null) { return entry.ReadTemporaryValue<Guid>(3); } else { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); } } } }, - (InternalEntityEntry entry) => + Guid (InternalEntityEntry entry) => { - var nullableValue = ((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)entry.Entity)["PrincipalsAlternateId"] : null; - return nullableValue == null ? default(Guid) : (Guid)nullableValue; + var nullableValue = (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("PrincipalsAlternateId") ? ((Dictionary<string, object>)(entry.Entity))["PrincipalsAlternateId"] : null); + return (nullableValue == null ? default(Guid) : ((Guid)(nullableValue))); }, - (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), - (ValueBuffer valueBuffer) => valueBuffer[3]); + Guid (InternalEntityEntry entry) => entry.ReadOriginalValue<Guid>(principalsAlternateId, 3), + Guid (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<Guid>(principalsAlternateId, 3), + object (ValueBuffer valueBuffer) => valueBuffer[3]); principalsAlternateId.SetPropertyIndexes( index: 3, originalValueIndex: 3, @@ -285,20 +285,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas beforeSaveBehavior: PropertySaveBehavior.Ignore, afterSaveBehavior: PropertySaveBehavior.Ignore); rowid.SetGetter( - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null), - (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : (byte[])(((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null), - (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); + byte[] (Dictionary<string, object> entity) => ((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null)))), + bool (Dictionary<string, object> entity) => (((IDictionary<string, object>)entity).ContainsKey("rowid") ? entity["rowid"] : null) == null, + byte[] (Dictionary<string, object> instance) => ((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null ? null : ((byte[])((((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null)))), + bool (Dictionary<string, object> instance) => (((IDictionary<string, object>)instance).ContainsKey("rowid") ? instance["rowid"] : null) == null); rowid.SetSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetMaterializationSetter( - (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = (object)value); + (Dictionary<string, object> entity, byte[] value) => entity["rowid"] = ((object)(value))); rowid.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => (byte[])(((IDictionary<string, object>)(Dictionary<string, object>)entry.Entity).ContainsKey("rowid") ? ((Dictionary<string, object>)entry.Entity)["rowid"] : null), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), - (ValueBuffer valueBuffer) => valueBuffer[4]); + byte[] (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(4) ? entry.ReadStoreGeneratedValue<byte[]>(4) : (entry.FlaggedAsTemporary(4) && (((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null) == null ? entry.ReadTemporaryValue<byte[]>(4) : ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))))), + byte[] (InternalEntityEntry entry) => ((byte[])((((IDictionary<string, object>)((Dictionary<string, object>)(entry.Entity))).ContainsKey("rowid") ? ((Dictionary<string, object>)(entry.Entity))["rowid"] : null))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(rowid, 4), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(rowid), + object (ValueBuffer valueBuffer) => valueBuffer[4]); rowid.SetPropertyIndexes( index: 4, originalValueIndex: 4, @@ -307,17 +307,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 4); rowid.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var key = runtimeEntityType.AddKey( new[] { derivedsId, derivedsAlternateId, principalsId, principalsAlternateId }); @@ -362,24 +362,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateCompositeFactory(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<IReadOnlyList<object>>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(rowid))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId)), (source.GetCurrentValue<byte[]>(rowid) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(rowid)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)((IProperty)derivedsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer<long>)((IProperty)principalsId).GetValueComparer()).Snapshot(default(long)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetValueComparer()).Snapshot(default(Guid)), default(byte[]) == null ? null : ((ValueComparer<byte[]>)((IProperty)rowid).GetValueComparer()).Snapshot(default(byte[])))); + ISnapshot () => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(((ValueComparer<long>)(((IProperty)derivedsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetValueComparer())).Snapshot(default(Guid)), ((ValueComparer<long>)(((IProperty)principalsId).GetValueComparer())).Snapshot(default(long)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetValueComparer())).Snapshot(default(Guid)), (default(byte[]) == null ? null : ((ValueComparer<byte[]>)(((IProperty)rowid).GetValueComparer())).Snapshot(default(byte[]))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<long, Guid, long, Guid, byte[]>(default(long), default(Guid), default(long), default(Guid), default(byte[]))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (Dictionary<string, object>)source.Entity; - return (ISnapshot)new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)((IProperty)derivedsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)((IProperty)derivedsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)((IProperty)principalsId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)((IProperty)principalsAlternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))); + var entity8 = ((Dictionary<string, object>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long, Guid, long, Guid>(((ValueComparer<long>)(((IProperty)derivedsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(derivedsId)), ((ValueComparer<Guid>)(((IProperty)derivedsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(derivedsAlternateId)), ((ValueComparer<long>)(((IProperty)principalsId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long>(principalsId)), ((ValueComparer<Guid>)(((IProperty)principalsAlternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(principalsAlternateId))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 5, diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..4b43c6dd1f6 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseUnsafeAccessors.cs @@ -0,0 +1,63 @@ +// <auto-generated /> +using System; +using System.Collections.Generic; +using System.Net; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalBaseUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref long? Id(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum Enum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Enum2>k__BackingField")] + public static extern ref CompiledModelTestBase.AnEnum? Enum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<FlagsEnum1>k__BackingField")] + public static extern ref CompiledModelTestBase.AFlagsEnum FlagsEnum1(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "get_FlagsEnum2")] + public static extern CompiledModelTestBase.AFlagsEnum Get_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "set_FlagsEnum2")] + public static extern void Set_FlagsEnum2(CompiledModelTestBase.PrincipalBase @this, CompiledModelTestBase.AFlagsEnum value); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeArray>k__BackingField")] + public static extern ref IPAddress[] RefTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<string> RefTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeIList>k__BackingField")] + public static extern ref IList<string> RefTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<RefTypeList>k__BackingField")] + public static extern ref List<IPAddress> RefTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeArray>k__BackingField")] + public static extern ref DateTime[] ValueTypeArray(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeEnumerable>k__BackingField")] + public static extern ref IEnumerable<byte> ValueTypeEnumerable(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeIList>k__BackingField")] + public static extern ref IList<byte> ValueTypeIList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<ValueTypeList>k__BackingField")] + public static extern ref List<short> ValueTypeList(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "_ownedField")] + public static extern ref CompiledModelTestBase.OwnedType _ownedField(CompiledModelTestBase.PrincipalBase @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Deriveds>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Deriveds(CompiledModelTestBase.PrincipalBase @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs index 02c2e38b095..33af97153bb 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Net; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -58,19 +57,19 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl } skipNavigation.SetGetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) == null, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(instance) == null); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) == null, + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance), + bool (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> instance) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(instance) == null); skipNavigation.SetSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetMaterializationSetter( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = value); + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> value) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = value); skipNavigation.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)entry.Entity), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(entry.Entity))), null, - (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), + ICollection<CompiledModelTestBase.PrincipalBase> (InternalEntityEntry entry) => entry.GetCurrentValue<ICollection<CompiledModelTestBase.PrincipalBase>>(skipNavigation), null); skipNavigation.SetPropertyIndexes( index: 4, @@ -79,12 +78,11 @@ public static RuntimeSkipNavigation CreateSkipNavigation1(RuntimeEntityType decl relationshipIndex: 6, storeGenerationIndex: -1); skipNavigation.SetCollectionAccessor<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>( - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity), - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(entity) = (ICollection<CompiledModelTestBase.PrincipalBase>)collection, - (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), - () => (ICollection<CompiledModelTestBase.PrincipalBase>)(ICollection<CompiledModelTestBase.PrincipalBase>)new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)); - skipNavigation.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("PrincipalDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals", "TestNamespace") }); + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, ICollection<CompiledModelTestBase.PrincipalBase> collection) => PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Principals(entity) = ((ICollection<CompiledModelTestBase.PrincipalBase>)(collection)), + ICollection<CompiledModelTestBase.PrincipalBase> (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> entity, Action<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>> setter) => ClrCollectionAccessorFactory.CreateAndSetHashSet<CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>, ICollection<CompiledModelTestBase.PrincipalBase>, CompiledModelTestBase.PrincipalBase>(entity, setter), + ICollection<CompiledModelTestBase.PrincipalBase> () => ((ICollection<CompiledModelTestBase.PrincipalBase>)(((ICollection<CompiledModelTestBase.PrincipalBase>)(new HashSet<CompiledModelTestBase.PrincipalBase>(ReferenceEqualityComparer.Instance)))))); return skipNavigation; } @@ -110,24 +108,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var dependent = runtimeEntityType.FindNavigation("Dependent")!; var manyOwned = runtimeEntityType.FindNavigation("ManyOwned")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, string, CompiledModelTestBase.AnEnum, Nullable<CompiledModelTestBase.AnEnum>, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)((IProperty)discriminator).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(discriminator)), ((ValueComparer<CompiledModelTestBase.AnEnum>)((IProperty)enum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2) == null ? null : ((ValueComparer<Nullable<CompiledModelTestBase.AnEnum>>)((IProperty)enum2).GetValueComparer()).Snapshot(source.GetCurrentValue<Nullable<CompiledModelTestBase.AnEnum>>(enum2)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum1).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)((IProperty)flagsEnum2).GetValueComparer()).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(source.GetCurrentValue<Point>(point)), (object)source.GetCurrentValue<IPAddress[]>(refTypeArray) == null ? null : (IPAddress[])((ValueComparer<object>)((IProperty)refTypeArray).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IPAddress[]>(refTypeArray)), (object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable) == null ? null : (IEnumerable<string>)((ValueComparer<object>)((IProperty)refTypeEnumerable).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable)), (object)source.GetCurrentValue<IList<string>>(refTypeIList) == null ? null : (IList<string>)((ValueComparer<object>)((IProperty)refTypeIList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<IList<string>>(refTypeIList)), (object)source.GetCurrentValue<List<IPAddress>>(refTypeList) == null ? null : (List<IPAddress>)((ValueComparer<object>)((IProperty)refTypeList).GetValueComparer()).Snapshot((object)source.GetCurrentValue<List<IPAddress>>(refTypeList)), (IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray) == null ? null : (DateTime[])((ValueComparer<IEnumerable<DateTime>>)((IProperty)valueTypeArray).GetValueComparer()).Snapshot((IEnumerable<DateTime>)source.GetCurrentValue<DateTime[]>(valueTypeArray)), source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeEnumerable).GetValueComparer()).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable)), (IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList) == null ? null : (IList<byte>)((ValueComparer<IEnumerable<byte>>)((IProperty)valueTypeIList).GetValueComparer()).Snapshot((IEnumerable<byte>)source.GetCurrentValue<IList<byte>>(valueTypeIList)), (IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList) == null ? null : (List<short>)((ValueComparer<IEnumerable<short>>)((IProperty)valueTypeList).GetValueComparer()).Snapshot((IEnumerable<short>)source.GetCurrentValue<List<short>>(valueTypeList))); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, string, CompiledModelTestBase.AnEnum, CompiledModelTestBase.AnEnum?, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Point, IPAddress[], IEnumerable<string>, IList<string>, List<IPAddress>, DateTime[], IEnumerable<byte>, IList<byte>, List<short>>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), (source.GetCurrentValue<string>(discriminator) == null ? null : ((ValueComparer<string>)(((IProperty)discriminator).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(discriminator))), ((ValueComparer<CompiledModelTestBase.AnEnum>)(((IProperty)enum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum>(enum1)), (source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2) == null ? null : ((ValueComparer<CompiledModelTestBase.AnEnum?>)(((IProperty)enum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AnEnum?>(enum2))), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum1).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum1)), ((ValueComparer<CompiledModelTestBase.AFlagsEnum>)(((IProperty)flagsEnum2).GetValueComparer())).Snapshot(source.GetCurrentValue<CompiledModelTestBase.AFlagsEnum>(flagsEnum2)), (source.GetCurrentValue<Point>(point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(source.GetCurrentValue<Point>(point))), (((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))) == null ? null : ((IPAddress[])(((ValueComparer<object>)(((IProperty)refTypeArray).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IPAddress[]>(refTypeArray))))))), (((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))) == null ? null : ((IEnumerable<string>)(((ValueComparer<object>)(((IProperty)refTypeEnumerable).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IEnumerable<string>>(refTypeEnumerable))))))), (((object)(source.GetCurrentValue<IList<string>>(refTypeIList))) == null ? null : ((IList<string>)(((ValueComparer<object>)(((IProperty)refTypeIList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<IList<string>>(refTypeIList))))))), (((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))) == null ? null : ((List<IPAddress>)(((ValueComparer<object>)(((IProperty)refTypeList).GetValueComparer())).Snapshot(((object)(source.GetCurrentValue<List<IPAddress>>(refTypeList))))))), (((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))) == null ? null : ((DateTime[])(((ValueComparer<IEnumerable<DateTime>>)(((IProperty)valueTypeArray).GetValueComparer())).Snapshot(((IEnumerable<DateTime>)(source.GetCurrentValue<DateTime[]>(valueTypeArray))))))), (source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable) == null ? null : ((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeEnumerable).GetValueComparer())).Snapshot(source.GetCurrentValue<IEnumerable<byte>>(valueTypeEnumerable))), (((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))) == null ? null : ((IList<byte>)(((ValueComparer<IEnumerable<byte>>)(((IProperty)valueTypeIList).GetValueComparer())).Snapshot(((IEnumerable<byte>)(source.GetCurrentValue<IList<byte>>(valueTypeIList))))))), (((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList))) == null ? null : ((List<short>)(((ValueComparer<IEnumerable<short>>)(((IProperty)valueTypeList).GetValueComparer())).Snapshot(((IEnumerable<short>)(source.GetCurrentValue<List<short>>(valueTypeList)))))))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<Point>(default(Point) == null ? null : ((ValueComparer<Point>)((IProperty)point).GetValueComparer()).Snapshot(default(Point)))); + ISnapshot () => ((ISnapshot)(new Snapshot<Point>((default(Point) == null ? null : ((ValueComparer<Point>)(((IProperty)point).GetValueComparer())).Snapshot(default(Point))))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<Point>(default(Point))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<Point>(default(Point))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<string, Point>(source.ContainsKey("Discriminator") ? (string)source["Discriminator"] : null, source.ContainsKey("Point") ? (Point)source["Point"] : null)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<string, Point>((source.ContainsKey("Discriminator") ? ((string)(source["Discriminator"])) : null), (source.ContainsKey("Point") ? ((Point)(source["Point"])) : null))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<string, Point>(default(string), default(Point))); + ISnapshot () => ((ISnapshot)(new Snapshot<string, Point>(default(string), default(Point))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity8 = (CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<Nullable<byte>>>)source.Entity; - return (ISnapshot)new Snapshot<Nullable<long>, Guid, object, object, object, object, object>(source.GetCurrentValue<Nullable<long>>(id) == null ? null : ((ValueComparer<Nullable<long>>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Nullable<long>>(id)), ((ValueComparer<Guid>)((IProperty)alternateId).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalBase__ownedField(entity8), null, UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(entity8)), null); + var entity8 = ((CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>>)(source.Entity)); + return ((ISnapshot)(new Snapshot<long?, Guid, object, object, object, object, object>((source.GetCurrentValue<long?>(id) == null ? null : ((ValueComparer<long?>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<long?>(id))), ((ValueComparer<Guid>)(((IProperty)alternateId).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<Guid>(alternateId)), PrincipalBaseUnsafeAccessors._ownedField(entity8), null, PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.Dependent(entity8), SnapshotFactoryFactory.SnapshotCollection(PrincipalDerivedUnsafeAccessors<CompiledModelTestBase.DependentBase<byte?>>.ManyOwned(entity8)), null))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 16, @@ -148,14 +146,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] - public static extern ref CompiledModelTestBase.DependentBase<byte?> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Dependent(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] - public static extern ref ICollection<CompiledModelTestBase.OwnedType> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_ManyOwned(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] - public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_PrincipalDerived1_Principals(CompiledModelTestBase.PrincipalDerived<CompiledModelTestBase.DependentBase<byte?>> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..924e4c82620 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedUnsafeAccessors.cs @@ -0,0 +1,23 @@ +// <auto-generated /> +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class PrincipalDerivedUnsafeAccessors<TDependent> + where TDependent : class + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Dependent>k__BackingField")] + public static extern ref TDependent Dependent(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "ManyOwned")] + public static extern ref ICollection<CompiledModelTestBase.OwnedType> ManyOwned(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Principals>k__BackingField")] + public static extern ref ICollection<CompiledModelTestBase.PrincipalBase> Principals(CompiledModelTestBase.PrincipalDerived<TDependent> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs index 704fba39a25..359ca91cf9f 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -73,20 +72,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -95,18 +94,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var key = runtimeEntityType.AddKey( new[] { id }); @@ -123,24 +121,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -161,8 +159,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/CheckConstraints/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs index 90956546837..b60f0b61394 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_parameter_type_mapping/FunctionParameterTypeMappingContextModelBuilder.cs @@ -48,17 +48,17 @@ partial void Initialize() "varchar"); param.TypeMapping = StringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varchar", dbType: System.Data.DbType.AnsiString)); diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs index 9409012cb15..bf9935f8304 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Custom_function_type_mapping/FunctionTypeMappingContextModelBuilder.cs @@ -50,17 +50,17 @@ partial void Initialize() getSqlFragmentStatic.TypeMapping = StringTypeMapping.Default.Clone( comparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), keyComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), providerValueComparer: new ValueComparer<string>( - (string v1, string v2) => v1 == v2, - (string v) => ((object)v).GetHashCode(), - (string v) => v), + bool (string v1, string v2) => v1 == v2, + int (string v) => ((object)v).GetHashCode(), + string (string v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "varchar", dbType: System.Data.DbType.AnsiString)); diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs index 3119766cd8e..5070aca8292 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -37,20 +36,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 0), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[0]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 0), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[0]); blob.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -59,18 +58,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); return runtimeEntityType; } @@ -79,21 +77,21 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) { var blob = runtimeEntityType.FindProperty("Blob")!; runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<byte[]>(source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<byte[]>((source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 1, navigationCount: 0, @@ -113,8 +111,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs index 80d5fe41020..dce2286b1fe 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/DbFunctionContextModelBuilder.cs @@ -78,17 +78,17 @@ partial void Initialize() getCount.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); functions["Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelRelationalTestBase+DbFunctionContext.GetCount(System.Guid?,string)"] = getCount; @@ -126,17 +126,17 @@ partial void Initialize() "INTEGER"); id0.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); @@ -167,17 +167,17 @@ partial void Initialize() isDateStatic.TypeMapping = BoolTypeMapping.Default.Clone( comparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), keyComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), providerValueComparer: new ValueComparer<bool>( - (bool v1, bool v2) => v1 == v2, - (bool v) => ((object)v).GetHashCode(), - (bool v) => v), + bool (bool v1, bool v2) => v1 == v2, + int (bool v) => ((object)v).GetHashCode(), + bool (bool v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); isDateStatic.AddAnnotation("MyGuid", new Guid("00000000-0000-0000-0000-000000000000")); diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs index c05ab594ac1..a09facf3cad 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/DbFunctions/ObjectEntityType.cs @@ -29,17 +29,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) { runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 0, navigationCount: 0, diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs index 704fba39a25..359ca91cf9f 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -38,11 +37,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -51,17 +50,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -73,20 +72,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -95,18 +94,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var key = runtimeEntityType.AddKey( new[] { id }); @@ -123,24 +121,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -161,8 +159,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Dynamic_schema/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs new file mode 100644 index 00000000000..ae6e1779611 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentBaseUnsafeAccessors.cs @@ -0,0 +1,15 @@ +// <auto-generated /> +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentBaseUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] + public static extern ref TKey Id(CompiledModelTestBase.DependentBase<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs index a8a511c8dc6..173e60df6c9 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedEntityType.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -37,20 +36,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) == 0, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(instance) == 0); + int (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentBaseUnsafeAccessors<int>.Id(entity) == 0, + int (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentBaseUnsafeAccessors<int>.Id(instance) == 0); id.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, int value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, int value) => DependentBaseUnsafeAccessors<int>.Id(entity) = value); id.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => DependentBaseUnsafeAccessors<int>.Id(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -59,21 +58,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); - id.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id", "TestNamespace") }); var data = runtimeEntityType.AddProperty( "Data", @@ -82,20 +80,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.DependentDerived<int>).GetField("<Data>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); data.SetGetter( - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity), - (CompiledModelTestBase.DependentDerived<int> entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) == null, - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance), - (CompiledModelTestBase.DependentDerived<int> instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(instance) == null); + string (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity), + bool (CompiledModelTestBase.DependentDerived<int> entity) => DependentDerivedUnsafeAccessors<int>.Data(entity) == null, + string (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance), + bool (CompiledModelTestBase.DependentDerived<int> instance) => DependentDerivedUnsafeAccessors<int>.Data(instance) == null); data.SetSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetMaterializationSetter( - (CompiledModelTestBase.DependentDerived<int> entity, string value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(entity) = value); + (CompiledModelTestBase.DependentDerived<int> entity, string value) => DependentDerivedUnsafeAccessors<int>.Data(entity) = value); data.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data((CompiledModelTestBase.DependentDerived<int>)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), - (ValueBuffer valueBuffer) => valueBuffer[1]); + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => DependentDerivedUnsafeAccessors<int>.Data(((CompiledModelTestBase.DependentDerived<int>)(entry.Entity))), + string (InternalEntityEntry entry) => entry.ReadOriginalValue<string>(data, 1), + string (InternalEntityEntry entry) => entry.GetCurrentValue<string>(data), + object (ValueBuffer valueBuffer) => valueBuffer[1]); data.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -103,7 +101,6 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); data.TypeMapping = SqliteStringTypeMapping.Default; - data.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DependentDerivedEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data", "TestNamespace") }); var key = runtimeEntityType.AddKey( new[] { id }); @@ -120,24 +117,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int, string>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)((IProperty)data).GetValueComparer()).Snapshot(source.GetCurrentValue<string>(data))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, string>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<string>(data) == null ? null : ((ValueComparer<string>)(((IProperty)data).GetValueComparer())).Snapshot(source.GetCurrentValue<string>(data)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => Snapshot.Empty); + ISnapshot (InternalEntityEntry source) => Snapshot.Empty); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => Snapshot.Empty); + ISnapshot (IDictionary<string, object> source) => Snapshot.Empty); runtimeEntityType.SetEmptyShadowValuesFactory( - () => Snapshot.Empty); + ISnapshot () => Snapshot.Empty); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.DependentDerived<int>)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.DependentDerived<int>)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -158,11 +155,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id>k__BackingField")] - public static extern ref int UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentBase1_Id(CompiledModelTestBase.DependentBase<int> @this); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] - public static extern ref string UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_DependentDerived1_Data(CompiledModelTestBase.DependentDerived<int> @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs new file mode 100644 index 00000000000..8847446bfea --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/SimpleModel/DependentDerivedUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DependentDerivedUnsafeAccessors<TKey> + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Data>k__BackingField")] + public static extern ref string Data(CompiledModelTestBase.DependentDerived<TKey> @this); + } +} diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs index 5601ff47390..2d335351ee5 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataEntityType.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -39,11 +38,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas afterSaveBehavior: PropertySaveBehavior.Throw, sentinel: 0); id.SetAccessors( - (InternalEntityEntry entry) => entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), - (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), - (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), - (ValueBuffer valueBuffer) => valueBuffer[0]); + int (InternalEntityEntry entry) => (entry.FlaggedAsStoreGenerated(0) ? entry.ReadStoreGeneratedValue<int>(0) : (entry.FlaggedAsTemporary(0) && entry.ReadShadowValue<int>(0) == 0 ? entry.ReadTemporaryValue<int>(0) : entry.ReadShadowValue<int>(0))), + int (InternalEntityEntry entry) => entry.ReadShadowValue<int>(0), + int (InternalEntityEntry entry) => entry.ReadOriginalValue<int>(id, 0), + int (InternalEntityEntry entry) => entry.ReadRelationshipSnapshotValue<int>(id, 0), + object (ValueBuffer valueBuffer) => valueBuffer[0]); id.SetPropertyIndexes( index: 0, originalValueIndex: 0, @@ -52,17 +51,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: 0); id.TypeMapping = IntTypeMapping.Default.Clone( comparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), keyComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), providerValueComparer: new ValueComparer<int>( - (int v1, int v2) => v1 == v2, - (int v) => v, - (int v) => v), + bool (int v1, int v2) => v1 == v2, + int (int v) => v, + int (int v) => v), mappingInfo: new RelationalTypeMappingInfo( storeTypeName: "INTEGER")); id.SetCurrentValueComparer(new EntryCurrentValueComparer<int>(id)); @@ -74,20 +73,20 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas fieldInfo: typeof(CompiledModelTestBase.Data).GetField("<Blob>k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly), nullable: true); blob.SetGetter( - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity), - (CompiledModelTestBase.Data entity) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) == null, - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance), - (CompiledModelTestBase.Data instance) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(instance) == null); + byte[] (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity), + bool (CompiledModelTestBase.Data entity) => DataUnsafeAccessors.Blob(entity) == null, + byte[] (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance), + bool (CompiledModelTestBase.Data instance) => DataUnsafeAccessors.Blob(instance) == null); blob.SetSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetMaterializationSetter( - (CompiledModelTestBase.Data entity, byte[] value) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(entity) = value); + (CompiledModelTestBase.Data entity, byte[] value) => DataUnsafeAccessors.Blob(entity) = value); blob.SetAccessors( - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob((CompiledModelTestBase.Data)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), - (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), - (ValueBuffer valueBuffer) => valueBuffer[1]); + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => DataUnsafeAccessors.Blob(((CompiledModelTestBase.Data)(entry.Entity))), + byte[] (InternalEntityEntry entry) => entry.ReadOriginalValue<byte[]>(blob, 1), + byte[] (InternalEntityEntry entry) => entry.GetCurrentValue<byte[]>(blob), + object (ValueBuffer valueBuffer) => valueBuffer[1]); blob.SetPropertyIndexes( index: 1, originalValueIndex: 1, @@ -96,18 +95,17 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeGenerationIndex: -1); blob.TypeMapping = SqliteByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => ((object)v).GetHashCode(), - (byte[] v) => v), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => ((object)v).GetHashCode(), + byte[] (byte[] v) => v), keyComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray()), + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray()), providerValueComparer: new ValueComparer<byte[]>( - (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), - (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), - (byte[] source) => source.ToArray())); - blob.AddRuntimeAnnotation("UnsafeAccessors", new[] { ("DataEntityType.UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob", "TestNamespace") }); + bool (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals(((object)(v1)), ((object)(v2))), + int (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode(((object)(v))), + byte[] (byte[] source) => source.ToArray())); var key = runtimeEntityType.AddKey( new[] { id }); @@ -130,24 +128,24 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) key.SetPrincipalKeyValueFactory(KeyValueFactoryFactory.CreateSimpleNonNullableFactory<int>(key)); key.SetIdentityMapFactory(IdentityMapFactoryFactory.CreateFactory<int>(key)); runtimeEntityType.SetOriginalValuesFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int, byte[]>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(source.GetCurrentValue<int>(id)), source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)((IProperty)blob).GetValueComparer()).Snapshot(source.GetCurrentValue<byte[]>(blob))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int, byte[]>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(source.GetCurrentValue<int>(id)), (source.GetCurrentValue<byte[]>(blob) == null ? null : ((ValueComparer<byte[]>)(((IProperty)blob).GetValueComparer())).Snapshot(source.GetCurrentValue<byte[]>(blob)))))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( - () => (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetValueComparer()).Snapshot(default(int)))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetValueComparer())).Snapshot(default(int)))))); runtimeEntityType.SetTemporaryValuesFactory( - (InternalEntityEntry source) => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot (InternalEntityEntry source) => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetShadowValuesFactory( - (IDictionary<string, object> source) => (ISnapshot)new Snapshot<int>(source.ContainsKey("Id") ? (int)source["Id"] : 0)); + ISnapshot (IDictionary<string, object> source) => ((ISnapshot)(new Snapshot<int>((source.ContainsKey("Id") ? ((int)(source["Id"])) : 0))))); runtimeEntityType.SetEmptyShadowValuesFactory( - () => (ISnapshot)new Snapshot<int>(default(int))); + ISnapshot () => ((ISnapshot)(new Snapshot<int>(default(int))))); runtimeEntityType.SetRelationshipSnapshotFactory( - (InternalEntityEntry source) => + ISnapshot (InternalEntityEntry source) => { - var entity = (CompiledModelTestBase.Data)source.Entity; - return (ISnapshot)new Snapshot<int>(((ValueComparer<int>)((IProperty)id).GetKeyValueComparer()).Snapshot(source.GetCurrentValue<int>(id))); + var entity = ((CompiledModelTestBase.Data)(source.Entity)); + return ((ISnapshot)(new Snapshot<int>(((ValueComparer<int>)(((IProperty)id).GetKeyValueComparer())).Snapshot(source.GetCurrentValue<int>(id))))); }); runtimeEntityType.Counts = new PropertyCounts( propertyCount: 2, @@ -168,8 +166,5 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) } static partial void Customize(RuntimeEntityType runtimeEntityType); - - [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] - public static extern ref byte[] UnsafeAccessor_Microsoft_EntityFrameworkCore_Scaffolding_Data_Blob(CompiledModelTestBase.Data @this); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs new file mode 100644 index 00000000000..193c8970250 --- /dev/null +++ b/test/EFCore.Sqlite.FunctionalTests/Scaffolding/Baselines/Triggers/DataUnsafeAccessors.cs @@ -0,0 +1,16 @@ +// <auto-generated /> +using System; +using System.Runtime.CompilerServices; +using Microsoft.EntityFrameworkCore.Scaffolding; + +#pragma warning disable 219, 612, 618 +#nullable disable + +namespace TestNamespace +{ + public static class DataUnsafeAccessors + { + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Blob>k__BackingField")] + public static extern ref byte[] Blob(CompiledModelTestBase.Data @this); + } +}